条件评估报告日志
小于 1 分钟
条件评估报告日志
SpringBoot 启动过程中,会打印输出如下信息:
2023-05-20 22:20:45.131 DEBUG 2696 --- [ main] ConditionEvaluationReportLoggingListener :
============================
CONDITIONS EVALUATION REPORT
============================
Positive matches:
-----------------
AopAutoConfiguration matched:
- @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)
追溯源码:
在org.springframework.boot.autoconfigure.logging
下 ConditionEvaluationReportMessage
类,打印输出方法如下:
public ConditionEvaluationReportMessage(ConditionEvaluationReport report) {
this(report, "CONDITIONS EVALUATION REPORT");
}
取消打印配置
方法一
在logback.xml配置
<logger name="org.springframework.boot.autoconfigure.logging" level='error' additivity="false">
<appender-ref ref="CONSOLE"/>
</logger>
方法二
logging:
level:
org:
springframework:
boot:
autoconfigure:
logging: ERROR # 日志不打印条件评估报告
