티스토리 뷰
반응형
springboot에서 설정 파일의 우선순위는 아래와 같습니다. 실제 내부 구현은 우선 순위 반대로 변수를 읽으면서 override한다.
- Devtools global settings properties in the $HOME/.config/spring-boot folder when devtools is active.
- @TestPropertySource annotations on your tests.
- properties attribute on your tests. Available on @SpringBootTest and the test annotations for testing a particular slice of your application.
- Command line arguments.
- Properties from SPRING_APPLICATION_JSON (inline JSON embedded in an environment variable or system property).
- ServletConfig init parameters.
- ServletContext init parameters.
- JNDI attributes from java:comp/env.
- Java System properties (System.getProperties()).
- OS environment variables.
- A RandomValuePropertySource that has properties only in random.*.
- Profile-specific application properties outside of your packaged jar (application-{profile}.properties and YAML variants).
- Profile-specific application properties packaged inside your jar (application-{profile}.properties and YAML variants).
- Application properties outside of your packaged jar (application.properties and YAML variants).
- Application properties packaged inside your jar (application.properties and YAML variants).
- @PropertySource annotations on your @Configuration classes. Please note that such property sources are not added to the Environment until the application context is being refreshed. This is too late to configure certain properties such as logging.* and spring.main.* which are read before refresh begins.
- Default properties (specified by setting SpringApplication.setDefaultProperties).
Application property files or yml files
- SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment:
- A /config subdir of the current directory.
- The current directory
- A classpath /config package
- The classpath root
반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 간부
- datasource
- 바리스타
- 스프링
- filter-plugin
- elasticsearch
- 자하손만두
- connection pool
- 라면집
- Git
- DBCP
- 요미우리자이언츠
- centOS
- logstash
- 시나가와
- 커넥션
- c3p0
- Fair-Trade Coffee
- 스팸메일방지 CEAS
- 일본여행
- elasitcsearch
- 리더쉽 코칭
- 이클립스
- 구로사와아키라
- 산모퉁이
- 간부사원
- 일정관리
- 청계천
- 요미우리 자이언츠
- LG트윈스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함
반응형