SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/me/F/MAVEN/MyRepos/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:/me/F/MAVEN/MyRepos/org/apache/logging/log4j/log4j-slf4j-impl/2.13.3/log4j-slf4j-impl-2.13.3.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 [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
上面表示: 类路径包含多个SLF4J绑定。
jar包冲突
解决办法很简单,就是既然抛了jar包冲突
,那我们就排除一个jar
包即可。关键是排除哪一个jar包
,这里注意下了,如果你用的是logback
日志,一定要排除slf4j-log4j12
包,不要排除logback-classic
包。同理。。。。。。
我要用log4j所以要排除logback-classic
包
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-logging
还有web start
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-logging
冲突消失。。。。。。