GWT,Gradle,多个SLF4J绑定错误

时间:2017-12-14 19:53:18

标签: gradle gwt slf4j

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in
[jar:file:/home/user/.IntelliJIdea2017.2/system/gwt/Lexical-Internal.cce6de70/rfiWebapp.1cb4267e/run/www/WEB-INF/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/user/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.12/485f77901840cf4e8bf852f2abb9b723eb8ec29/slf4j-log4j12-1.7.12.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] 
Dec 14, 2017 2:24:38 PM org.mongodb.morphia.logging.MorphiaLoggerFactory choose LoggerFactory
INFO: LoggerImplFactory set to org.mongodb.morphia.logging.jdk.JDKLoggerFactory

为什么/.IntelliJIdea2017.2/中有什么东西......?

如何排除该部分?

/.gradle/中的另一个...似乎在我的外部库中。

1 个答案:

答案 0 :(得分:0)

您的类路径中有两个slf4j-log4j12-1.7.12.jar

如果您可以从slf4j-log4j12-1.7.12.jar文件夹中删除WEB-INF/lib或从build.gradle中排除依赖项(从依赖关系树中找到它并将其排除),它就应该完成这项工作。