springboot项目jar冲突问题解决

问题:大概意思就是项目中有两个jar,同时是要是想slf4j的接口的,这样程序不知道使用哪一个,就会报错了。也不算错,项目照样运行。可是就是报日志错误
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding
in [jar:file:/Users/renjianjun/software/mavenLocalRespository/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:/Users/renjianjun/software/mavenLocalRespository/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-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]

 解决方式:html

咱们须要先找到哪里使用了这些jar,咱们去 .pom文件中让项目显示jar依赖关系图maven

而后找到了依赖,那么咱们就选择咱们想要保留的 和 要删除的进行操做spa

我这里不须要logback  因此,我在logback3d

而后在pom文件中就会把这个jar抛出掉日志

而后就行了,大功告成。code

相关文章
相关标签/搜索