Discuss / Java / 遇到报错SLF4J:Failed to load class “org.slf4j.impl.StaticLoggerBinder”

遇到报错SLF4J:Failed to load class “org.slf4j.impl.StaticLoggerBinder”

Topic source

百度以后发现是要添加slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar,slf4j-jdk14.jar或 logback-classic.jar中的其中一个jar包就行(只能是一个,多了就会有冲突)。于是引入依赖如下:

<dependency>

    <groupId>org.slf4j</groupId>

    <artifactId>slf4j-simple</artifactId>

    <version>1.7.25</version>

    <scope>compile</scope>

  </dependency>

问题成功解决!


  • 1

Reply