在运行代码时,出现下面的错误,

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  

 

posted on 2019-02-23 16:43  小白coder  阅读(7405)  评论(0编辑  收藏  举报