公司的垃圾Gradle项目,每次切换模块之后就莫名其妙报这个错。。。。。。
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3569edd5: startup date [Tue Jul 06 02:02:35 UTC 2021]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417) [spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002) [spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961) [spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at cn.iqis.boot.application.Application.main(Application.java:21) [main/:na]
Build一下就好了。。。,不行你就刷一下gradle,再build一下,还不行你就重新拉代码吧。。。

如果还是不行,在启动项目的时候,你一定要喊佛祖保佑!
博主在日常工作中遇到一个头疼的问题:公司使用Gradle构建的项目在切换模块后经常出现异常,具体表现为`IllegalStateException: LifecycleProcessor not initialized`。解决这个问题的方法包括重新构建项目、刷新Gradle状态或者甚至重新拉取代码。尽管这些方法有时有效,但博主建议在启动项目时祈祷一切顺利。这是一个关于Java Spring Boot应用与Gradle构建问题的实战分享。

6万+

被折叠的 条评论
为什么被折叠?



