dependencies failed

来源:5-14 spring、springmvc配置实操

慕仔6545590

2021-08-08

以下问题如何解决?
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

写回答

1回答

geelylucky

2021-08-11

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
1
慕仔6545590
配置文件没动过,用的源码
2021-08-11
共1条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程