最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

运维笔记admin3浏览0评论

报错详情:

  • 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')

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论