当前位置: 首页 > 知识库问答 >
问题:

spring工具套件SLF4J:类路径包含多个SLF4J绑定

宗建章
2023-03-14

运行mvn clean install会在控制台中引发以下错误

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Applications/SpringToolSuite4.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/Applications/SpringToolSuite4.app/Contents/Eclipse/configuration/org.eclipse.osgi/1965/0/.cp/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.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Applications/SpringToolSuite4.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/Applications/SpringToolSuite4.app/Contents/Eclipse/configuration/org.eclipse.osgi/1965/0/.cp/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.SimpleLoggerFactory]

共有1个答案

童冠玉
2023-03-14

以下命令解决了问题

mv file:/Applications/SpringToolSuite4.app/Contents/Eclipse/configuration/org.eclipse.osgi/1965/0/.cp/org/slf4j/impl/StaticLoggerBinder.class file:/Applications/SpringToolSuite4.app/Contents/Eclipse/configuration/org.eclipse.osgi/1965/0/.cp/org/slf4j/impl/StaticLoggerBinder.class1
 类似资料: