FrameWork/Spring Boot
-
Spring Boot 외부설정 우선순위FrameWork/Spring Boot 2020. 3. 12. 18:50
Spring Boot에서 외부설정으로는 아래와같이 사용 할수있다. properties YAML 환경 변수 커맨드 라인 Argument 프로 퍼티 우선순위 1. 유저 홈 디렉토리에 있는 spring-boot-dev-tools.properties 2. 테스트에 있는 @TestPropertySource 3. @SpringBootTest 애노테이션의 properties 애트리뷰트 4. 커맨드 라인 아규먼트 5. SPRING_APPLICATION_JSON (환경 변수 또는 시스템 프로티) 에 들어있는 프로퍼티 6. ServletConfig 파라미터 7. ServletContext 파라미터 8. java:comp/env JNDI 애트리뷰트 9. System.getProperties() 자바 시스템 프로퍼티 10. ..