SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder“. SLF4J: Defaulting to no-operation (

错误产生环境

启动SpringBoot工程时产生

错误描述

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.

在这里插入图片描述

错误原因

此错误在组织slf4j.inf.strestcoperbinder类无法装入内存时报告。当在类路径上找不到合适的slf4j绑定时,就会发生这种情况。slf4j-nop.jar放置一个(且只有一个), slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar 或 logback-classic.jar 的类路径应该解决这个问题。

解决办法

在pom.xml文件中新增依赖

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
        </dependency>

猜你喜欢

转载自blog.csdn.net/qq_42025798/article/details/121304243