Consider defining a bean of type xxx.xxx.xxxxin your configura

古城微笑少年丶 2023-07-06 06:17 129阅读 0赞

最近做项目时,启动总是报错:
Description:

Field cmsPageClient in com.xuecheng.manage_course.service.CourseService required a bean of type ‘com.xuecheng.manage_course.client.CmsPageClient’ that could not be found.

Action:

Consider defining a bean of type ‘com.xuecheng.manage_course.client.CmsPageClient’ in your configuration.


2020-02-16 17:30:18.518 [main] DEBUG o.s.b.d.LoggingFailureAnalysisReporter - Application failed to start due to an exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.xuecheng.manage_course.client.CmsPageClient’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

经过几次排查发现都没错。
于是检查启动类:
在这里插入图片描述
发现注解写错了。
在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,129人围观)

还没有评论,来说两句吧...

相关阅读