_002_Log4j_解決log4j:WARN No appenders could be found for logger (org.springframework.web.context.Cont
來自https://www.cnblogs.com/codingcloud/p/5197737.html,感謝作者的無私分享。
spring專案經常在啟動tomcat時報如下警告資訊:
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly.
網上貼出了各種解決辦法我試了一下都不管用,這個錯誤資訊應該是在載入spring的contextLoader時沒有找到log4j造成的,所以解決方案很簡單,就是把spring的配置contextConfigLocation放在log4j配置之後就OK了!我給大家貼出圖,就一目瞭然了:
如果按照這個順序配置web.xml的話,就不會有哪個警告提示了,而且可以看到完整的spring日誌!
相關文章
- 2.No appenders could be found for logger(log4j)APP
- mysql中出現Unit mysql.service could not be found 的解決方法MySql
- 解決:Could not load dynamic library ‘cudart64_101.dll‘; dlerror: cudart64_101.dll not foundDartError
- 解決vue3 頁面重新整理控制檯報[Vue Router warn]: No match found for location with path“xxxxx” 警告問題Vue
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- Android: The following classes could not be instantiated: 解決方法Android
- bash: lspci: command not found解決方法
- [Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined" found in <App> at src/App.vueVueErrorUndefinedAPP
- Go:錯誤 could not launch process: EOF 解決Go
- could not autowire. No beans of 'xxxx' 問題解決Bean
- -bash: XXX: command not found解決辦法
- 解決Vue中”This dependency was not found”的方法Vue
- a commponent required a bean of type XXXXXX that could not be found-2022新專案UIBean
- Elasticsearch 史詩級 log4j 漏洞解決Elasticsearch
- Many To Many could not initialize proxy – no Session的解決方法Session
- 關於 artisan migrants Could not find drive 解決方法
- 解決CocoaPods could not find compatible versions for pod "React/Core"React
- Could not decode a text frame as UTF-8 的解決
- 解決bash: mysql: command not found的問題MySql
- android sqlite3 not found 解決總結AndroidSQLite
- CertPathValidatorException: Trust anchor for certification path not found解決方法ExceptionRust
- Mac終端出現 brew command not found 解決Mac
- zabbix_get :command not found 解決辦法
- Linux提示crontab command not found的解決方法Linux
- HV000030: No validator could be found for constraint ‘javax.validation.constraints.Pattern‘ validatiAIJava
- elasticsearch 的 log4j漏洞怎麼解決啊?Elasticsearch
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet解決方案ExceptionSQL
- “command-not-found has crashed” 解決辦法 (*unsolved)
- 解決nltk_data LookupError: Resource punkt not found.Error
- 解決shell指令碼錯誤$’r’ command not found指令碼
- 解決 The ‘supervisor==3.2.0‘ distribution was not found and is required by the application錯誤UIAPP
- #Schpringbot#_bug解決_jsp檔案not_foundJS
- 基於 logger sdk-logger 封裝封裝
- SpringBoot Log4j 安全漏洞分析及解決方案Spring Boot
- java.lang.IllegalArgumentException: Could not find class異常解決方式JavaException
- ubuntu解決Could not get lock /var/lib/dpkg/lock-frontendUbuntu
- Could not initialize class sun.awt.X11GraphicsEnvironment解決方案
- springboot專案解決 No beans of 'UserDao' type found 問題Spring BootBean