馬斯克對新冠疫苗態度轉彎:我已接種,科學是毫不含糊的
真是處處都是坑,一步一個坑。
因為log4j2的漏洞暴露的原因,整改專案中的所有使用log4j2的日誌列印,更換為logback
結果程式碼更換完後,專案直接啟動不起了
直接上報錯:
09:39:22,934 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@11:100 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
09:39:22,940 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@18:143 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
09:39:22,941 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@27:114 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
09:39:22,941 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@28:113 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
09:39:22,941 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@29:124 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
原因是我用的配置檔名稱為logback.xml,導致專案啟動時先載入logback後加載application.properties 導致放在application.properties讀取不到所以報錯。
結果將logback.xml改為logback-spring.xml就可以了
參考:https://blog.csdn.net/qq_17394183/article/details/89920053