问题:
SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext

有log包冲突,需要处理冲突的包
方式1.排除以下包【如果有】

log4j-to-slf4j-2.0.2.jar
log4j-to-slf4j-2.0.2-sources.jar
log4j-slf4j-impl-2.0.2.jar
log4j-slf4j-impl-2.0.2-sources.jar

方式2.排除spring-boot-starter下的log4j-to-slf4j包
直接引入logging排除对应包

 <dependency>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-logging</artifactId>
 <exclusions>
 <exclusion>
 <groupId>org.apache.logging.log4j</groupId>
 <artifactId>log4j-to-slf4j</artifactId>
 </exclusion>
 </exclusions>
 </dependency>

一片秋叶一树春
47 声望3 粉丝

贪君子之财,好美景之色,行正义之事,了前生之愿,爱此生之人!!!!!