启动Tomcat时报错

来源:6-9 用户模块所有功能自测试

慕田峪0455357

2018-05-07

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageController': 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.UserManageController.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 [D:\apache-tomcat-9.0.6\webapps\ROOT\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: 'file [D:\apache-tomcat-9.0.6\webapps\ROOT\WEB-INF\classes\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: 'file [D:\apache-tomcat-9.0.6\webapps\ROOT\WEB-INF\classes\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回答

polo哦

2018-05-07

 Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.mmall.dao.CartMapper.BaseResultMap
你的CartMapper这个里面的BaseResultMap参数错了,检查下

0
2
想当厨师的码农
回复
慕田峪0455357
我的是CategoryMapper错误,我查了里面的BaseResultMap没有重复....删除了CategoryMapper还是报Category错误.你是清空了缓存吗?怎么清的
2018-08-09
共2条回复

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

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

9476 学习 · 8804 问题

查看课程