TIL

섹션 10. 스프링부트 자세히 살펴보기

스프링부트 자세히 살펴보기

자동 구성 분석 방법

자동 구성 조건 결과 확인

@SpringBootApplication
public class SpringbootAcApplication {
  @Bean
  ApplicationRunner run(ConditionEvaluationReport report) {
    return args -> {
      report.getConditionAndOutcomesBySource().entrySet().stream()
          .filter(co -> co.getValue().isFullMatch())
          .forEach(co -> {
              System.out.println(co.getKey());
              co.getValue().forEach(c -> {
                  System.out.println("/t" + c.getOutcome());
              });
              System.out.println();
          });       
    }
  }
  
  public static void main(String[] args) { SpringApplication.run(SpringbootAcApplication.class, args); }
}

Core 자동 구성 살펴보기

@AutoConfiguration
@ConditionalOnProperty(prefix = "spring.aop", name = "auto", havingValue = "true", matchIfMissing = true)
public class AopAutoConfiguration { ... }

Web 자동 구성 살펴보기

Jdbc 자동 구성 살펴보기