SLF4J: Class path contains multiple SLF4J bindings.

logback 日志的开发者和log4j 的开发者是一波人,而springboot 默认日志是,较新的logback 日志。

但是在以前流行的日志却是log4j ,而且很多的第三方工具都含有log4j 得引入。

 排除 zookeeper 中的  log4j12

<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>${zookeeper.version}</version> 
    <!--排除这个slf4j-log4j12-->
    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
    </exclusions>
</dependency>
原文地址:https://www.cnblogs.com/vipsoft/p/14637041.html