老师,问一下。启动Application.java时报以下错误,service层我加了@service 完全按视频操作来的

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

慕的地9216348

2018-12-09

老师,问一下。启动Application.java时报以下错误,service层我加了@service
Error creating bean with name ‘registLoginController’: Unsatisfied dependency expressed through field ‘userService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userServiceImpl’: Unsatisfied dependency expressed through field ‘userMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘usersMapper’ defined in file [E:\javaFiles\imooc-videos-dev\imooc-videos-dev-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 [E:\javaFiles\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

写回答

3回答

donezio

2018-12-21

我后来是userMapper 不知道为什么是错的。。对着源码改回来就是了

0
0

donezio

2018-12-09

我也是这样。。mapper没有重复。。能拉一下群吗, 774738171 谢谢!!

0
1
风间影月
老师没有权限,请自己用验证码添加
2018-12-09
共1条回复

风间影月

2018-12-09

检查你的所有mapper,看看是不是有重复

0
4
慕的地9216348
这个错误明白。是自动生成的项目操作多次,生成的java类有问题
2018-12-22
共4条回复

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

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

2613 学习 · 1952 问题

查看课程