当前位置: 移动技术网 > IT编程>数据库>MSSQL > 【Bug解决】org.apache.ibatis.type.TypeException: The alias ‘xxxx‘ is already mapped to the value ‘xxx‘

【Bug解决】org.apache.ibatis.type.TypeException: The alias ‘xxxx‘ is already mapped to the value ‘xxx‘

2020年07月31日  | 移动技术网IT编程  | 我要评论
mework.beans.factory.BeanCreationException: Error creating bean with name 'appUserDao' defined in file [D:\xxx\xx\xxx\target\classes\com\ai\ecs\ecop\app\dao\AppUserDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean proper
mework.beans.factory.BeanCreationException: Error creating bean with name 'appUserDao'
 defined in file [D:\xxx\xx\xxx\target\classes\com\ai\ecs\ecop\app\dao\AppUserDao.class]:
 Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory';
 nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'sqlSessionFactory' defined in file
 [D:\xxx\xxx\xxx\target\classes\META-INF\spring\spring-context.xml]: 
Invocation of init method failed; nested exception is org.apache.ibatis.type.TypeException:
 The alias 'xxx' is already mapped to the value '....

MyBatis别名冲突,原因是类名相同,即使包路径不相同也会报这个错。!!!
会一直循环打印:

DEBUG org.apache.ibatis.io.ResolverUtil Reader entry...
DEBUG org.apache.ibatis.io.ResolverUtil Find JAR URL...
DEBUG org.apache.ibatis.io.ResolverUtil Not a JAR:..

本文地址:https://blog.csdn.net/qq_42391904/article/details/107691892

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网