话不多说,报错信息如下:
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类无法加载到内存中。当在类路径上找不到合适的SLF4J绑定时,就会发生这种情况。这里引入相应的依赖即可。
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>

详细解答路径:
http://www.slf4j.org/codes.html#StaticLoggerBinder
http://slf4j.org/manual.html#swapping
本文解决了一个关于SLF4J日志框架的问题,即'org.slf4j.impl.StaticLoggerBinder'类无法加载导致的日志实现失效。通过引入logback-classic依赖,成功解决了这一问题。
2万+

被折叠的 条评论
为什么被折叠?



