使用intellij蛉签,在啟動項目時發(fā)現(xiàn)jar包依賴
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/deploy/apache-maven-3.5.3/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/deploy/apache-maven-3.5.3/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]
在網上搜索悯嗓,說是jar包依賴導致的,應該在某些引用的jar包中排除SLF4J依賴骚秦,可從pom界面她倘,查看依賴關系圖,搜索jar包并執(zhí)行exclusion操作作箍,但操作過后依然沒有排除掉硬梁,于是使用以下命令行查找maven依賴,并手動排除掉依賴
查看依賴關系
mvn dependency:tree