_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
- log4j:WARN Please initialize the log4j system properly解決辦法
- mysql中出現Unit mysql.service could not be found 的解決方法MySql
- npm WARN unmet dependency錯誤解決方法NPM
- MySQL server PID file could not be found!MySqlServer
- 解決 command not found: expressExpress
- AIX dtterm not found的解決AI
- Could not find *.apk!解決辦法APK
- 解決"Could not reserve enough space for object heap"Object
- kattle Driver class 'oracle.jdbc.driver.OracleDriver' could not be foundOracleJDBC
- 解決Vue中”This dependency was not found”的方法Vue
- sqlplus: command not found解決SQL
- Mysql啟動錯誤-server PID file could not be foundMySqlServer
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- Go:錯誤 could not launch process: EOF 解決Go
- Could not find jar tool executable問題解決JAR
- jar檔案could not find the main class解決JARAI
- 解決:Could not load dynamic library ‘cudart64_101.dll‘; dlerror: cudart64_101.dll not foundDartError
- [Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined" found in <App> at src/App.vueVueErrorUndefinedAPP
- Elasticsearch 史詩級 log4j 漏洞解決Elasticsearch
- bash: lspci: command not found解決方法
- symfony 2 No route found for “GET /” 的解決方法
- Invalid bound statement (not found)錯誤解決
- 解決警告“ld: warning: directory not found for option”
- SpringBoot學習——@Autowired自動注入報:could not be found問題的理解和解決方案Spring Boot
- MysqL錯誤之_ERROR! MySQL server PID file could not be found!MySqlErrorServer
- Many To Many could not initialize proxy – no Session的解決方法Session
- elasticsearch 的 log4j漏洞怎麼解決啊?Elasticsearch
- 解決bash: mysql: command not found的問題MySql
- android sqlite3 not found 解決總結AndroidSQLite
- Mac終端出現 brew command not found 解決Mac
- 解決ntp的錯誤 no server suitable for synchronization foundServerUI
- zabbix_get :command not found 解決辦法
- JNI開發:Class android.content.Context could not be foundAndroidContext
- 關於 artisan migrants Could not find drive 解決方法
- Could not decode a text frame as UTF-8 的解決
- Android: The following classes could not be instantiated: 解決方法Android
- Could not resolve host: 'localhost 報錯解決辦法localhost