首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何从Spring boot应用程序的控制台中排除条件评估报告?

如何从Spring boot应用程序的控制台中排除条件评估报告?
EN

Stack Overflow用户
提问于 2018-05-10 21:02:14
回答 4查看 22.3K关注 0票数 24

当我运行我的Spring引导应用程序时,我在我的控制台日志中得到了条件评估报告。

如何在Spring启动中从控制台日志中禁用或排除此报告?

代码语言:javascript
运行
复制
============================
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)

...
EN

回答 4

Stack Overflow用户

发布于 2018-05-10 21:19:23

您可以通过更改org.springframework.boot.autconfigure的日志级别来执行此操作。例如,通过在application.properties中添加以下行

代码语言:javascript
运行
复制
logging.level.org.springframework.boot.autoconfigure=ERROR
票数 35
EN

Stack Overflow用户

发布于 2019-07-18 13:55:29

如果您满足以下条件,您将获得条件结果报告:

  • 将IDE配置为显示调试输出(例如,如果您在IntelliJ中的Spring boot运行配置中设置了Enable debug output )。

  • 将application.properties.

  • Set中的属性debug=true org.springframework.boot.autoconfigure.logging的日志记录级别设置为DEBUG.

当您试图找出某些bean没有被加载的原因时,这会很有用,因为通过这个报告,您可以确切地看到哪个自动配置正在被加载,哪个没有被加载(以及原因)。

您可以通过撤消前面提到的要点来禁用此输出。例如,可以将org.springframework.boot.autoconfigure.logging的日志记录级别设置为INFO

代码语言:javascript
运行
复制
logging.level.org.springframework.boot.autoconfigure.logging=INFO
票数 27
EN

Stack Overflow用户

发布于 2019-03-08 22:17:40

other answer正常工作时,还可以将日志级别设置为INFO

代码语言:javascript
运行
复制
logging.level.org.springframework.boot.autoconfigure=INFO
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50273570

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档