简体   繁体   English

将 spring-boot 应用从 2.3.5 迁移到 2.4.0

[英]Migrate spring-boot app from 2.3.5 to 2.4.0

I migrated a spring-boot app from 2.3.5 to 2.4.0 and deployed on tomcat.我将 spring-boot 应用程序从 2.3.5 迁移到 2.4.0 并部署在 tomcat 上。

The app failed to start-up on :该应用程序无法启动:

Caused by: java.lang.NullPointerException
    at **org.springframework.core.io.support.SpringFactoriesLoader.loadSpringFactories(SpringFactoriesLoader.java:136)**
    at org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(SpringFactoriesLoader.java:132)
    at org.springframework.core.io.support.SpringFactoriesLoader.loadFactories(SpringFactoriesLoader.java:101)
    at org.springframework.boot.logging.LoggingSystemFactory.lambda$fromSpringFactories$0(LoggingSystemFactory.java:44)
    at org.springframework.boot.logging.DelegatingLoggingSystemFactory.getLoggingSystem(DelegatingLoggingSystemFactory.java:41)

I checked https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#upgrading-from-spring-boot-23 , but found nothing obvious.我检查了https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#upgrading-from-spring-boot-23 ,但没有发现明显的问题。

Anyone encountered similar issues and resolved them?有人遇到过类似的问题并解决了吗?

Fixed in 2.4.1在 2.4.1 中修复

Thanks谢谢

It is due to a bug that is fixed in this commit https://github.com/spring-projects/spring-framework/commit/a0544e78ea2b4736122ff0dffaf6fe0c729b32a1#diff-5cfb6e321ece4799e72ea0af1a677eb04698e85458408dfd21e1b8ca2d41b5b0这是由于在此提交中修复了一个错误https://github.com/spring-projects/spring-framework/commit/a0544e78ea2b4736122ff0dffaf6fe0c729b32a1#diff-5cfb6e321ece4799e72ea0af1a6784de0af1a67852b4b5c852b5c85cb85ca

The fix is available in Spring 5.3.2 and I have confirmed that it works when using that version.该修复程序在 Spring 5.3.2 中可用,我已经确认它在使用该版本时有效。

If you are using Maven you can import https://mvnrepository.com/artifact/org.springframework/spring-framework-bom/5.3.2 above the spring-boot-dependencies BOM in your <dependencyManagement> -section.如果您使用的是 Maven,则可以在<dependencyManagement>的 spring-boot-dependencies BOM 上方导入https://mvnrepository.com/artifact/org.springframework/spring-framework-bom/5.3.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM