簡體   English   中英

將 spring-boot 應用從 2.3.5 遷移到 2.4.0

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

我將 spring-boot 應用程序從 2.3.5 遷移到 2.4.0 並部署在 tomcat 上。

該應用程序無法啟動:

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)

我檢查了https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#upgrading-from-spring-boot-23 ,但沒有發現明顯的問題。

有人遇到過類似的問題並解決了嗎?

在 2.4.1 中修復

謝謝

這是由於在此提交中修復了一個錯誤https://github.com/spring-projects/spring-framework/commit/a0544e78ea2b4736122ff0dffaf6fe0c729b32a1#diff-5cfb6e321ece4799e72ea0af1a6784de0af1a67852b4b5c852b5c85cb85ca

該修復程序在 Spring 5.3.2 中可用,我已經確認它在使用該版本時有效。

如果您使用的是 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