SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"问题解决方法

问题描述

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

原因分析

我用了spring-boot-dependencies里自带的slf4j-log4j12log4j的包,然后这两个包的版本貌似并不兼容,重写一下版本就好了。

解决方法

springdependency添加两个dependency

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>

猜你喜欢

转载自blog.csdn.net/Mr_OOO/article/details/79671113