在運行代碼時,出現下面的錯誤,
log4j:WARN No appenders could be found for logger (genericTest.GenericTest). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
解決方法是在pom.xml中添加下面的依賴:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.8.2</version>
</dependency>
參考網址
https://blog.csdn.net/u013412790/article/details/76983788
