some properties some.url=https://www.some.com 1. @PropertySource - config class @PropertySource("classpath:/my/application/some.properties") or @PropertySources({ @PropertySource("classpath:/my/application/some.properties"), @PropertySource(name="otherProperties", value={"classpath:/my/application/other.properties"}) }) or @PropertySource({"classpath:/my/application/some.properties", "classpath:..
외부에 있는 property를 읽어와서 적용해야하는 상황이 있다. 직접 파일로 읽어와도 좋고 Typesafe에서 제공하는 Config 같은 라이브러리를 사용해도 좋다. 심플하게 property를 읽어올 수 있는 Typesafe Config의 사용 방법을 간략히 소개한다. resource 로 지정된 디렉토리 하위의 property, conf 파일을 읽어온다. property file path/name을 지정하지 않으면 위에서 아래로 이름의 우선순위를 가진다. ConfigFactory.load(); // first-listed are higher priority 1. application.conf (all resources on classpath with this name) 2. application.jso..
- Total
- Today
- Yesterday
- Discriminate Mapping
- guava
- Query DSL
- RetryTemplate
- Spring Registrar
- Criteria
- Property
- @Primary
- Embedded Mapping
- Join Table
- JPA
- DI
- java EqualsAndHashCode
- java generic
- JPA Criteria
- Charles proxy
- Spring JDBC Template
- Embeddable Mapping
- scikit-learn
- 복합키 Mapping
- Sprint RetryTemplate
- Mapping
- Registrar
- Akka
- docker
- Spring
- spring spel
- Typesafe Config
- java Equals
- SmartLifecycle
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |