如何从Spring引导应用程序的控制台中排除条件评估报告?
当我运行Spring boot应用程序时,我会在控制台日志中获得条件评估报告 如何在Spring boot中从控制台日志中禁用或排除此报告如何从Spring引导应用程序的控制台中排除条件评估报告?,spring,spring-boot,Spring,Spring Boot,当我运行Spring boot应用程序时,我会在控制台日志中获得条件评估报告 如何在Spring boot中从控制台日志中禁用或排除此报告 ============================ CONDITIONS EVALUATION REPORT ============================ Positive matches: ----------------- AopAutoConfiguration matched: - @ConditionalO
============================
CONDITIONS EVALUATION REPORT
============================
Positive matches:
-----------------
AopAutoConfiguration matched:
- @ConditionalOnClass found required classes 'org.springframework.context.annotation.EnableAspectJAutoProxy', 'org.aspectj.lang.annotation.Aspect', 'org.aspectj.lang.reflect.Advice', 'org.aspectj.weaver.AnnotatedElement'; @ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)
AopAutoConfiguration.CglibAutoProxyConfiguration matched:
- @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)
CacheAutoConfiguration matched:
- @ConditionalOnClass found required class 'org.springframework.cache.CacheManager'; @ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- @ConditionalOnBean (types: org.springframework.cache.interceptor.CacheAspectSupport; SearchStrategy: all) found bean 'cacheInterceptor'; @ConditionalOnMissingBean (names: cacheResolver; types: org.springframework.cache.CacheManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
...
您可以通过更改org.springframework.boot.autconfigure的日志级别来实现这一点。例如,在
application.properties
中添加以下行:
logging.level.org.springframework.boot.autoconfigure=ERROR
工作时,还可以将日志级别设置为INFO
:
logging.level.org.springframework.boot.autoconfigure=INFO
logging.level.org.springframework.boot.autoconfigure.logging=INFO
如果您:
- 将IDE配置为显示调试输出(例如,如果在IntelliJ中的Spring引导运行配置中设置了启用调试输出)
- 在application.properties中设置属性
debug=true
- 将
的日志记录级别设置为org.springframework.boot.autoconfigure.logging
DEBUG
org.springframework.boot.autoconfigure.logging
的日志记录级别设置为INFO
:
logging.level.org.springframework.boot.autoconfigure=INFO
logging.level.org.springframework.boot.autoconfigure.logging=INFO
将IDE配置为显示调试输出(例如,如果在IntelliJ中的Spring引导运行配置中设置了Enable debug output)代码>我这样做了,我不知道如何禁用它。请帮忙。