springboot运行时出错

来源:5-7 swagger2的使用与接口测试

assdasffas

2018-09-16

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)] - [WARN] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘registController’: Unsatisfied dependency expressed through field ‘userService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userServiceIml’: Unsatisfied dependency expressed through field ‘usersMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘usersMapper’ defined in file [D:\idea_java_project\video_test\Mapper\target\classes\com\imooc\mapper\UsersMapper.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:\idea_java_project\video_test\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
2018-09-16 16:53:58,201 [main] [org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer.logAutoConfigurationReport(AutoConfigurationReportLoggingInitializer.java:101)] - [INFO]

写回答

3回答

风间影月

2018-09-16

检查所有mapper中是否有重复的

1
3
assdasffas
回复
风间影月
emmmm是的了,comment里面多了,o(╥﹏╥)o
2018-09-16
共3条回复

风间影月

2018-09-16

使用逆向工具务必检查生成的代码

0
0

风间影月

2018-09-16

baseResultMap生成了多个

0
0

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

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

2613 学习 · 1952 问题

查看课程