天天看點

SLF4J: Failed to load class

官方的解決辦法描述:

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory.

This happens when no appropriate SLF4J binding could be found on the class path.

Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.      

是以說解決的辦法:

在Maven工程的pom檔案增加依賴

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

繼續閱讀