老师,问一下。启动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 不知道为什么是错的。。对着源码改回来就是了
00 -
donezio
2018-12-09
我也是这样。。mapper没有重复。。能拉一下群吗, 774738171 谢谢!!
012018-12-09 -
风间影月
2018-12-09
检查你的所有mapper,看看是不是有重复
042018-12-22
相似问题