티스토리 뷰
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
- 일본여행
- 일정관리
- 라면집
- Git
- 시나가와
- 자하손만두
- 간부사원
- 요미우리 자이언츠
- elasitcsearch
- 청계천
- 구로사와아키라
- c3p0
- 커넥션
- 스팸메일방지 CEAS
- 스프링
- DBCP
- Fair-Trade Coffee
- 리더쉽 코칭
- LG트윈스
- logstash
- 요미우리자이언츠
- elasticsearch
- datasource
- 간부
- centOS
- filter-plugin
- connection pool
- 이클립스
- 바리스타
- 산모퉁이
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함