[SpringBoot报错]Consider defining a bean of type ‘xxx‘ in your configuration, NoSuchBeanDefinitionExce

报错详情: Error starting ApplicationContext. To display the conditions report re-run your application with debug

报错详情:

  • Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

  • 2022-08-03 09:41:13.156|ERROR|||||||||||main|LoggingFailureAnalysisReporter|

  • ***************************

  • APPLICATION FAILED TO START

  • ***************************

  • Description:

  • Field UserRoleRefv01Service in com.xxx.xxxx.xxxxx.xxxxxx.controller.v01.controller.xxxxxController required a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' that could not be found.

  • The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

  • Action:

  • Consider defining a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' in your configuration.

 NoSuchBeanDefinitionException: No qualifying bean of type 'xxx.xxxxx.xxxx.service.portal.v01.service.XxxxXxx' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 

解决方案 

在service实现类(xxxxxxImpl.java)里添加

@Service('xxxxxx')

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738333833a4038483.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信