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

有log包抵触,须要解决抵触的包
形式1.排除以下包【如果有】

log4j-to-slf4j-2.0.2.jarlog4j-to-slf4j-2.0.2-sources.jarlog4j-slf4j-impl-2.0.2.jarlog4j-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>