log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.
SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/H:/maven-repository/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerB
·
springboot整合dubbo时,会发生log4j重复加载的问题,可以查看那些依赖使用了log4j,增加sxclude排除即可
在pom.xml里面,zookeeper排除slf4j-log4j12和log4j
<!-- zookeeper -->
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.8</version>
<exclusions>
<!--排除slf4j-log4j12-->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<!--排除这个log4j-->
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
更多推荐
已为社区贡献2条内容
所有评论(0)