SLF4J: Class path contains multiple SLF4J bindings
程序员文章站
2022-05-04 14:41:22
...
启动项目,服务器用的是tomcat,在启动的时候,eclipse的console中用红色的字体,提示:
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/D:/software/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/D:/software/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
从中筛选出信息,slf4j-log4j12-1.7.2.jar、log4j-slf4j-impl-2.4.1.jar,以及Class path contains multiple SLF4J bindings,说明是slf4j-log4j12-1.7.2.jar和 log4j-slf4j-impl-2.4.1.jar重复了,应该去掉其中一个jar包。
我把slf4j-log4j12-1.7.2.jar包去掉后项目启动正常。
上一篇: 更好的日志管理SLF4J教程
下一篇: ATS+Nginx+FastDFS