복붙노트

[SPRING] Spring 부트 애플리케이션의 콘솔에서 조건 평가 보고서를 제외하려면 어떻게합니까?

SPRING

Spring 부트 애플리케이션의 콘솔에서 조건 평가 보고서를 제외하려면 어떻게합니까?

스프링 부트 애플리케이션을 실행할 때 콘솔 로그에 조건 평가 보고서가 표시됩니다.

스프링 부트시 콘솔 로그에서이 보고서를 비활성화하거나 제외하려면 어떻게합니까?

============================
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)

...

해결법

  1. ==============================

    1.org.springframework.boot.autconfigure의 로그 레벨을 변경하여이를 수행 할 수 있습니다. 예를 들어 application.properties에 다음 행을 추가합니다.

    org.springframework.boot.autconfigure의 로그 레벨을 변경하여이를 수행 할 수 있습니다. 예를 들어 application.properties에 다음 행을 추가합니다.

    logging.level.org.springframework.boot.autoconfigure=ERROR
    
  2. ==============================

    2.다른 대답이 작동하는 동안 로그 수준을 INFO로 설정할 수도 있습니다.

    다른 대답이 작동하는 동안 로그 수준을 INFO로 설정할 수도 있습니다.

    logging.level.org.springframework.boot.autoconfigure=INFO
    
  3. ==============================

    3.다음과 같은 경우 상태 결과 보고서를 받게됩니다.

    다음과 같은 경우 상태 결과 보고서를 받게됩니다.

    이것은 특정 빈이로드되지 않는 이유를 찾으려 할 때 유용 할 수 있습니다.이 보고서를 통해로드되는 자동 구성과로드되지 않은 구성 (그리고 이유)을 정확하게 볼 수 있기 때문입니다.

    앞서 언급 한 글 머리 기호를 실행 취소하여이 출력을 비활성화 할 수 있습니다. 예를 들어 org.springframework.boot.autoconfigure.logging의 로깅 수준을 INFO로 설정할 수 있습니다.

    logging.level.org.springframework.boot.autoconfigure.logging=INFO
    
  4. from https://stackoverflow.com/questions/50273570/how-can-i-exclude-the-conditions-evaluation-report-from-the-console-of-a-spring by cc-by-sa and MIT license