No found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:

后端 未结 13 808
时光说笑
时光说笑 2020-12-08 01:43

I am trying to write a SOAP service using Spring, however I receive a Dependency Injection issue. I\'m having problems using @Autowired through the Service like

相关标签:
13条回答
  • 2020-12-08 02:30

    In my case, I had the following structure of a project:

    When I was running the test, I kept receiving problems with auro-wiring both facade and kafka attributes - error came back with information about missing instances, even though the test and the API classes reside in the very same package. Apparently those were not scanned.

    What actually helped was adding @Import annotation bringing the missing classes to Spring classpath and making them being instantiated.

    0 讨论(0)
提交回复
热议问题