请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

dependencies failed

以下问题如何解决?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘categoryManageController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.service.IUserService com.mmall.controller.backend.CategoryManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘iUserService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userMapper’ defined in file [/Users/chenghaiyan/Downloads/apache-tomcat-9.0.52/webapps/mmall_war/WEB-INF/classes/com/mmall/dao/UserMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: : Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘URL [jar:file:/Users/chenghaiyan/Downloads/apache-tomcat-9.0.52/webapps/mmall_war/WEB-INF/lib/mmall-1.0-SNAPSHOT.jar!/mappers/CartMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.mmall.dao.CartMapper.BaseResultMap; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘URL [jar:file:/Users/chenghaiyan/Downloads/apache-tomcat-9.0.52/webapps/mmall_war/WEB-INF/lib/mmall-1.0-SNAPSHOT.jar!/mappers/CartMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.mmall.dao.CartMapper.BaseResultMap

正在回答 回答被采纳积分+3

1回答

geelylucky 2021-08-11 00:10:19

Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.mmall.dao.CartMapper.BaseResultMap; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed;

检查下 xml的配置 同学

0 回复 有任何疑惑可以回复我~
  • 提问者 慕仔6545590 #1
    配置文件没动过,用的源码
    回复 有任何疑惑可以回复我~ 2021-08-11 00:12:07
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信