qq_怎么就迟了_0
2019-05-05 20:08
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'app':
Unsatisfied dependency expressed through field 'userDOMapper': No qualifying bean of type [com.cut.dao.UserDOMapper] found for dependency [com.cut.dao.UserDOMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cut.dao.UserDOMapper] found for dependency [com.cut.dao.UserDOMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
求大神解救一下,一直报这个错误,开始我完全照老师的代码,报这个错误,后来我把接口类加上Component注解或者Repository注解反正能换的我都试过了,完全报同样的错误,检查了各个配置的路径也没有错误,代码不报错,编译报错。不知道问题出在哪,怎么解决??
把所有接口上的注解改成@Mapper问题解决
你这个问题解决了吗?
看看是这个问吗
用@Resource代替@autowried
这个好像是生成的UserDOMapper.xml和UserPasswordDOMapper.xml文件中重复生成了resultMap,然后删掉重复的就好了,希望有帮助
对userDoMapper变量进行setter方式注入,试试
SpringBoot构建电商基础秒杀项目
49020 学习 · 954 问题
相似问题