其他分享
首页 > 其他分享> > Conmi的正确答案——“Failed to load class “org.slf4j.impl.StaticLoggerBinder“.”的解决方案

Conmi的正确答案——“Failed to load class “org.slf4j.impl.StaticLoggerBinder“.”的解决方案

作者:互联网

Springboot版本:2.1.4.RELEASE
JDK:8


现状:
可以打印banner,不能打印日志。

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 ::        (v2.1.4.RELEASE)

解决方案:
原pom.xml中只添加了:
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.31</version>
        </dependency>

现pom.xml中修改为:
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.31</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.31</version>
        </dependency>

标签:load,__,1.7,StaticLoggerBinder,Conmi,slf4j,org,___
来源: https://blog.csdn.net/fengwangzhe000/article/details/118802571