問題:大概意思就是項目中有兩個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