现象:① 应用不可访问 ,tomcat容器正常;
② 日志如下
分析步骤: 查看localhost日志,taskexecutorService 和 TurnServiceImpl 类有循环依赖问题
tomcat日志文件说明 参照 https://blog.csdn.net/weixin_34202952/article/details/86028909
05-Aug-2019 09:39:13.818 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'taskexecutorService': Bean with name 'taskexecutorService' has been injected into other beans [turnService] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
解决方案:taskexecutorService 增加 @Lazy注解;