Log4j2 could not find a logging implementation

错误信息:

Log4j2 could not find a logging implementation. Please add log4j-core to the classpath

解决办法:
pom把log4j-api也加进去

 <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.9.1</version>
        </dependency>
    原文作者:alonwang
    原文地址: https://www.jianshu.com/p/ae7142e0c5e2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞