SLF4J: CLASS PATH CONTAINS MULTIPLE SLF4J BINDINGS的解决办法

报错日志:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/admin/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/admin/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.11.2/log4j-slf4j-impl-2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

由于多个jar包实现了SLF4J bindings接口,类加载时就出现了歧义,由于多个jar包实现了SLF4J bindings接口,类加载时就出现了歧义

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency>
```

org.springframework.boot
spring-boot-starter-web


org.springframework.boot
spring-boot-starter-logging




参考:https://www.freesion.com/article/284562944/
posted @ 2022-02-12 19:40  micer  阅读(956)  评论(0编辑  收藏  举报