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:..
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐