springboot mapper注解失败

来源:1-2 Spring Boot 的角色

慕先生8084447

2018-01-25 10:22

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.heshen.mapper.PersonsMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 32 common frames omitted5a693f3c0001613a05780325.jpg
5a693f43000121cd08030632.jpg
5a693f4700013c9804360516.jpg

写回答 关注

1回答

  • qq_记忆单车_0
    2018-01-25 14:41:00
    已采纳

    http://img4.mukewang.com/5a697be90001000808320106.jpg

    试下这个

Spring Boot 2.0深度实践-初遇Spring Boot

Spring Boot 2.x/Web Flux/多模块化项目实践

75471 学习 · 212 问题

查看课程

相似问题