SpringBoot如何禁用自动配置的Logback日志?

百步穿杨 5月前

看起来Springboot自动配置自己使用Tomcat的Logback。我想禁用它并使用我在类路径中提供的那个。

目前我的代码报如下异常信息:

LoggerFactory is not a Logback LoggerContext but Logback is on the 
classpath. Either remove Logback or the competing implementation (class 
org.slf4j.impl.SimpleLoggerFactory) Object of class 
[org.slf4j.impl.SimpleLoggerFactory] must be an instance of class 
ch.qos.logback.classic.LoggerContext


*
*