Spring Boot: multiple SLF4J bindings

I had the exact same problem and could only see the dependency coming from spring boot. It also brought in log4j-over-slf4j, which clashed with my own requirement of slf4j-log4j12. Solved by adding the exclusions below. This is more specific that excluding the spring boot logging.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter</artifactId>
    <exclusions>
        <exclusion>
            <artifactId>logback-classic</artifactId>
            <groupId>ch.qos.logback</groupId>
        </exclusion>
        <exclusion>
            <artifactId>log4j-over-slf4j</artifactId>
            <groupId>org.slf4j</groupId>
        </exclusion>
    </exclusions>
</dependency>

Leave a Comment