我正在使用 Log4j2 創(chuàng)建 Spring-Boot 應(yīng)用程序。我使用的庫(kù)是:https : //mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.11.1 https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j -核心/2.11.1在這些 jars 中找不到類(lèi)ListAppender。當(dāng)我嘗試導(dǎo)入時(shí):org.apache.logging.log4j.test有一個(gè)信息:“無(wú)法解析符號(hào)...”,就像沒(méi)有這樣的包。但我可以在 github 中看到:https : //github.com/apache/logging-log4j2/blob/master/log4j-core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java 它存在。問(wèn)題的根源是什么?我是否以正確的方式做每件事?
Log4j2 - 無(wú)法訪問(wèn) ListAppender
達(dá)令說(shuō)
2022-01-06 17:06:38