Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I exclude the conditions evaluation report from the console of a Spring boot application?

Tags:

When I run my Spring boot application, I get the conditions evaluation report in my console logs.

How can I disable or exclude this report from my console logs in Spring boot?

============================ 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)  ... 
like image 329
Ashlin Karkada Avatar asked May 10 '18 13:05

Ashlin Karkada


People also ask

What is condition evaluation report spring boot?

Condition Evaluation Report. First of all, spring boot provides useful ConditionEvaluationReport at the application startup. But this report is not visible in logs by default. To enable this, you need to add the following configuration to your application. properties .

How do I exclude EnableAutoConfiguration in spring boot?

If you find that specific auto-configure classes are being applied that you don't want, you can use the exclude attribute of @EnableAutoConfiguration to disable them. If the class is not on the classpath, you can use the excludeName attribute of the annotation and specify the fully qualified name instead.

Which of the following options matches auto-configuration report prepared spring boot?

The auto-configuration report contains information about the classes that Spring Boot found on the classpath and configured automatically. It also shows information about classes that are known to Spring Boot but were not found on the classpath.

How do you check autoconfiguration in spring boot?

Auto-Configuration in Spring Boot The annotation @EnableAutoConfiguration is used to enable the auto-configuration feature. The @EnableAutoConfiguration annotation enables the auto-configuration of Spring ApplicationContext by scanning the classpath components and registering the beans.


1 Answers

You can do this by changing the log level of org.springframework.boot.autconfigure. For example by adding the following line within application.properties:

logging.level.org.springframework.boot.autoconfigure=ERROR 
like image 110
Ashlin Karkada Avatar answered Oct 25 '22 22:10

Ashlin Karkada