【Bug解决】org.apache.ibatis.type.TypeException: The alias ‘xxxx‘ is already mapped to the value ‘xxx‘
程序员文章站
2022-08-18 09:00:42
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
推荐阅读