springboot2.1.6(目前最新版本)整合log4j2 日志包冲突解决方案

 SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/software/apache-maven-3.5.0-bin/apache-maven-3.5.0/repo/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:/F:/software/apache-maven-3.5.0-bin/apache-maven-3.5.0/repo/org/apache/logging/log4j/log4j-slf4j-impl/2.11.2/log4j-slf4j-impl-2.11.2.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]

 
            org.springframework.boot
            spring-boot-starter-web
            
                
                    org.springframework.boot
                    spring-boot-starter-logging
                
                
                    com.fasterxml.jackson.core
                    jackson-databind
                
            
        

        
            org.springframework.boot
            spring-boot-starter-log4j2
            
                
                    org.apache.logging.log4j
                    log4j-slf4j-impl
                
                
                    org.slf4j
                    slf4j-api
                
            
        

在pom文件中的这两个依赖做排除,这是目前唯一解决方案,之前老版本的方案目前已不适用

你可能感兴趣的:(日常bug)