删除多个 slf4j 绑定警告无效
Removing multiple slf4j bindings warnings didn't work
我正在尝试删除我的 java 项目中的以下警告。我试图排除我在 maven repo 上找到的附加绑定。但其中 none 有效。非常感谢任何解决问题的想法。
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/backup_concert/ase-core/com.aepona.iotp.parent/springboard-azure-parent/springboard-registry-app-azure/target/springboard-registry-app-azure-0.3.1-SNAPSHOT.jar!/BOOT-INF/lib/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/backup_concert/ase-core/com.aepona.iotp.parent/springboard-azure-parent/springboard-registry-app-azure/target/springboard-registry-app-azure-0.3.1-SNAPSHOT.jar!/BOOT-INF/lib/slf4j-simple-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]
很明显,你同时拥有 log4j-slf4j-impl-2.7.jar 和 slf4j-simple-1.7.25.jar,删除其中一个。
对您的依赖关系树的分析应该能为您指明正确的方向。如果您使用的是 Maven,则命令为 mvn dependency:tree
。您可能希望将输出添加到您的问题中以获得进一步的帮助。
我正在尝试删除我的 java 项目中的以下警告。我试图排除我在 maven repo 上找到的附加绑定。但其中 none 有效。非常感谢任何解决问题的想法。
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/backup_concert/ase-core/com.aepona.iotp.parent/springboard-azure-parent/springboard-registry-app-azure/target/springboard-registry-app-azure-0.3.1-SNAPSHOT.jar!/BOOT-INF/lib/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/backup_concert/ase-core/com.aepona.iotp.parent/springboard-azure-parent/springboard-registry-app-azure/target/springboard-registry-app-azure-0.3.1-SNAPSHOT.jar!/BOOT-INF/lib/slf4j-simple-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]
很明显,你同时拥有 log4j-slf4j-impl-2.7.jar 和 slf4j-simple-1.7.25.jar,删除其中一个。
对您的依赖关系树的分析应该能为您指明正确的方向。如果您使用的是 Maven,则命令为 mvn dependency:tree
。您可能希望将输出添加到您的问题中以获得进一步的帮助。