Error creating bean with name 'XXX' defined in file

来源:8-6 评论回复功能开发

旎旎君

2019-05-16

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmController’: Unsatisfied dependency expressed through field ‘bgmService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmServiceImpl’: Unsatisfied dependency expressed through field ‘bgmMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmMapper’ defined in file [D:\工具软件\eclipse\eclipse\workplaces\imooc-videos-dev\imooc-videos-dev-mapper\target\classes\com\imooc\mapper\BgmMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\工具软件\eclipse\eclipse\workplaces\imooc-videos-dev\imooc-videos-dev-mini-api\target\classes\mapper\CommentsMapper.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.imooc.mapper.CommentsMapper.BaseResultMap

请问老师 这个是什么问题呢?

写回答

1回答

风间影月

2019-05-16

检查所有mappser.xml,有重复id

1
1
旎旎君
找到问题了,谢谢老师的提醒!!!
2019-05-16
共1条回复

Spring Boot短视频小程序开发 全栈式实战项目

一门课程带你搞定短视频小程序全栈开发,毕业设计之利器!

2613 学习 · 1952 问题

查看课程