运行maven项目时,出现以下错误
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.
错误原因是:加载 "org.slf4j.impl.StaticLoggerBinder"时失败
我的解决方法是,
在pom.xml中加入以下依赖
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>compile</scope>
</dependency>
我加入这个依赖之后项目就可以正常运行了