dao提取到公共包后,启动报错

提问 未结 2 131
xiaohao204
悬赏:20积分
版本:renren-security 开发环境:
dao提取到公共包后,启动报错 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.test.common.dao.BlockchainSummaryDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1654) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1213) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ... 24 common frames omitted
回帖
  • springboot没扫描到对应的包,可以了解一下springboot扫包机制
    0 回复
  • xiaohao204
    2019-08-12
    @Mark @SpringBootApplication(scanBasePackages = { "com.test.common", "com.test.admin" }) 我设置了扫描注解
    0 回复