我在Spring中有一个不满意的依赖关系,如何查看@ComponentScan发现的内容?

时间:2018-07-09 02:06:15

标签: spring-boot

我已将org.springframework.context.annotation的日志记录设置为调试,但 对于在Application.java中基于@ComponentScan的原因为何找不到该bean,我看不出任何帮助

21:04:08.436 [main] ERROR org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1d7acb34] to prepare test instance [com.pds.pdssr.bootstrap.EtlFileServicesTest@2bbaf4f0]
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.pds.pdssr.bootstrap.EtlFileServicesTest': Unsatisfied dependency expressed through field 'etlFileServices'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.pds.pdssr.bootstrap.EtlFileServices' 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.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587)

0 个答案:

没有答案