Spring Boot启动出现Failed to load class "org.slf4j.impl.StaticLoggerBinder"的问题

编程知识 更新时间:2023-04-05 04:19:15

今天搭建springboot的环境,在pom文件引入依赖

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>

搭建完毕之后出现如下结果:

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

查看http://www.slf4j/codes.html#StaticLoggerBinde

解决方法应该就是引入slf4j-nop.jar就好了:
在pom.xml引入:

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

运行后发现没有提示Failed to load class “org.slf4j.impl.StaticLoggerBinder”


还有一种方法(不推荐)就是换成旧版本的springboot

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.3.RELEASE</version>
    </parent>

更多推荐

Spring Boot启动出现Failed to load class "org.slf4j.impl.StaticLoggerBinder"

本文发布于:2023-04-05 04:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/d0e3ae651980d96528052c78e5f410f4.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:load   class   Failed   Spring   Boot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 44733文章数
  • 14阅读数
  • 0评论数