CAT

机会总留给有准备的人!

mybatis:Cause: org.apache.ibatis.type.TypeException问题解决

1.在SqlConfigMap.xml中配置typeAlises


2.在UserMapper.xml中作如下逻辑:


3.报错如下:

org.apache.ibatis.exceptions.PersistenceException: 
### Error building SqlSession.
### The error may exist in com/zxy/mybatis/mapper/UserMapper.xml
### The error occurred while processing mapper_resultMap[userResultMap1]
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap1'.  Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap1

4.后来查资料发现是UserMapper中的对应resultMap的属性写错了,应该为“resultMap”


阅读更多
版权声明:转载请注明地址 https://blog.csdn.net/CAT_cwds/article/details/80691498
文章标签: Mybatis
个人分类: mybatis
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭