SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
作者:互联网
当前log相关依赖
<!-- https://mvnrepository.com/artifact/log4j/log4j --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency>
运行报错(运行内容:https://www.cnblogs.com/uncleyong/p/16676791.html):
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.
sl4j和log4j的不兼容导致,添加下面依赖即可
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.21</version> <scope>test</scope> </dependency>
标签:load,StaticLoggerBinder,SLF4J,slf4j,org,log4j 来源: https://www.cnblogs.com/uncleyong/p/16676830.html