现象
程序启动是报错
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 false
Action:
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等初始化加载标签。
更多推荐
Consider revisiting the entries above or defining a bean of type *** that could
发布评论