SLF4J: Class path contains multiple SLF4J bindings
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/xxx/.m2/repository/ch/qos/logback/logback-classic/1.2.5/logback-classic-1.2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/xxx/.m2/repository/ch/qos/logback/logback-classic/1.2.4/logback-classic-1.2.4.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]
编译项目报这个warning,意思是有多个SLF4J
1、mvn dependency:tree
打开终端,定位到项目所在的目录,输入命令。
上面提示中“ch/qos/logback/logback-classic”,根据提示,我们找到相应的地方,排除就可以解决。
2. 使用
org.mybatis.spring.boot mybatis-spring-boot-starter 1.2.0 ch.qos.logback logback-classic
重新启动application,warning就消失了。
https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/
mybatis : http://mybatis.org/spring/zh/index.html
https://spring.io/projects/spring-boot#learn
分析:
其实之前的项目并没有出现过类似的情况,也不要去排除,但这次竟然报了个warning,后来发现因为之前的一些打印日志不出来了,
然后根据eclipse的提示操作,然后就误把另一个项目引入到了Java Build Path中,导致出现了冲突报错,直接删除,问题解决。