如何修复启动应用程序时上下文初始化异常?[关闭]

How can I fix context initialization exception while launching the application? [closed]

提问人:Ucha 提问时间:11/16/2023 更新时间:11/16/2023 访问量:42

问:


编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将帮助其他人回答这个问题。

3天前关闭。

晚上好,我的应用程序无法启动,我得到的原因是:

Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.authenticationEventPublisher
2023-11-16T00:16:39.653+04:00  INFO 9452 --- [  restartedMain] .s.b.a.l.ConditionEvaluationReportLogger : 
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-11-16T00:16:39.702+04:00 ERROR 9452 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

pom.xml文件似乎没有问题,因为我已经检查了几次,没有发现错误。

Google 建议检查 maven 依赖项的兼容性。运行了 mvn dependency:tree 并检查了 everyting。我已经添加了所有建议的依赖项,通过 maven 清理、重建和安装命令;然后再次运行该应用程序,它仍然因同样的原因失败。我尝试了调试,但没有得到任何其他信息。请帮忙谢谢。

java intellij-idea spring-security

评论

1赞 Toerktumlare 11/16/2023
请使用完整的 DEBUG 或 TRACE 日志输出更新您的问题
1赞 omar mahameed 11/16/2023
您使用的是哪个 JVM 版本?
1赞 CrazyCoder 11/16/2023
它是否仅在 IntelliJ IDEA 或 Maven/Gradle 中失败?
1赞 Ucha 11/17/2023
@omarmahameed Java 版本为 1.8.0_391
1赞 Ucha 11/17/2023
@CrazyCoder是的,它在 Intellij 和 Maven 中都失败了

答: 暂无答案