欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SLF4J: Class path contains multiple SLF4J bindings.

程序员文章站 2022-04-28 14:08:57
...

错误信息:

SLF4J: Class path contains multiple SLF4J bindings.

日志:


SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/X:/code/apache-maven-3.5.4/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:/X:/code/apache-maven-3.5.4/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.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]

原因机器解决办法:

springboot 默认日志是较新的logback 日志,不用再引入slf4j 日志了,
只要把pom.xml文件中的slf4j日志依赖删除就好了;