600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > Consider revisiting the entries above or defining a bean of type *** that could not be found

Consider revisiting the entries above or defining a bean of type *** that could not be found

时间:2022-04-26 04:34:33

相关推荐

Consider revisiting the entries above or defining a bean of type *** that could not be found

现象

程序启动是报错

16:58:47.845 ERROR 11524 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************APPLICATION FAILED TO START***************************Description:A component required a bean of type 'xxx' that could not be found.The following candidates were found but could not be injected:- xxx resulted in falseAction:Consider revisiting the entries above or defining a bean of type xxx in your configuration.Disconnected from the target VM, address: '127.0.0.1:51851', transport: 'socket'Process finished with exit code 1

分析

未找到需要引用的类

解决方案

确认pom中引入了该类jar包;Spring初始化是否会扫描该类所在的目录,非启动目录可以使用ComponentScan加入启动扫描;Spring是否对该类实现进行了初始化加载,实现类上是否使用了Component、Service等初始化加载标签。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。