사용자 도구

사이트 도구


springframework:springboot:autoconfigure

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
springframework:springboot:autoconfigure [2018/07/25 20:35]
kwon37xi
springframework:springboot:autoconfigure [2021/08/20 09:56] (현재)
kwon37xi
줄 3: 줄 3:
   * [[https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-autoconfigure|spring-boot-autoconfigure]] 모듈의 소스를 참조하면 자동 설정 원리를 파악할 수 있다.   * [[https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-autoconfigure|spring-boot-autoconfigure]] 모듈의 소스를 참조하면 자동 설정 원리를 파악할 수 있다.
   * [[https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories|spring.factories]]에 자동설정 Configuration 목록 있음.   * [[https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories|spring.factories]]에 자동설정 Configuration 목록 있음.
 +
 +===== Auto Configuration exclude =====
 +  * [[https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html|16. Auto-configuration]]
 +  * [[https://tech.asimio.net/2017/10/17/Disabling-Redis-Autoconfiguration-in-Spring-Boot-applications.html|Disabling Redis Auto-configuration in Spring Boot applications]]
 +  * [[http://wonwoo.ml/index.php/post/1599|Spring boot configuration]]
 +  * ''spring.autoconfigure.exclude'' 프라퍼티를 yaml 에 지정해서 불필요한 Auto Configuration loading을 막을 수 있다.<code>
 +spring:
 +  autoconfigure:
 +    exclude:
 +      - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
 +      - org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
 +</code>
 +  * 혹은, ''@SpringBootApplication'' 애노테이션에서도 가능하다. <code java>
 +@SpringBootApplication(
 +  exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class }
 +)
 +// 문자열로. FQCN 이 아니어도 되는지 여부 확인 필요.
 +@SpringBootApplication(
 +  excludeName = { "RedisAutoConfiguration", "RedisRepositoriesAutoConfiguration" }
 +)
 +</code>
 +
 +===== @AutoConfigurationAfter, @AutoConfigurationBefore =====
 +  * 특정 Auto Configuration 실행 전후에 할 설정임을 마킹.
 +
 +<code java>
 +@Configuration
 +@AutoConfigureBefore(JacksonAutoConfiguration.class)
 +public class SpringAutoConfiguration {
 +}
 +</code>
  
 ===== Custom Starter ===== ===== Custom Starter =====
줄 8: 줄 39:
   * [[https://www.javadevjournal.com/spring-boot/spring-boot-custom-starter/|Custom Starter with Spring Boot | Java Development Journal]]   * [[https://www.javadevjournal.com/spring-boot/spring-boot-custom-starter/|Custom Starter with Spring Boot | Java Development Journal]]
  
 +===== 참조 =====
 +  * [[https://www.baeldung.com/spring-data-disable-auto-config|Disable Spring Data Auto Configuration | Baeldung]]
springframework/springboot/autoconfigure.1532518543.txt.gz · 마지막으로 수정됨: 2018/07/25 20:35 저자 kwon37xi