springboot application在tomcat启动卡住
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot application在tomcat启动卡住相关的知识,希望对你有一定的参考价值。
参考技术A 在启动的run方法加个异常捕获,看看输出的错误信息,再解决问题即可。SpringBoot报错“To display the auto-configuration report re-run your application with ‘debug‘ enabled.“
异常
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-06-13 13:18:55.548 ERROR 79340 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field service in com.demo.springcloud.controller.Controller required a bean of type 'com.demo.springcloud.service.DeptService' that could not be found.
Action:
Consider defining a bean of type 'com.demo.springcloud.service.DeptService' in your configuration.
原因
在控制器类中注入了DeptService类
但是DeptService并没有注册成为Bean,交由Spring容器管理。
解决
在DeptService接口的实现类上添加@Service注解,注册成为Bean。
以上是关于springboot application在tomcat启动卡住的主要内容,如果未能解决你的问题,请参考以下文章
springboot启动报错退出,To display the conditions report re-run your application with 'debug' enabl
application.properties中的SpringBoot未知属性
Spring Boot之application.properites的failed to convert java.lang.String to java.lang.Integer问题解决
springboot配置jpa提示Unable to resolve name [mysql] as strategy
Spring boot 2.0.3.RELEASE, Spring data rest, application error, failed to start