배포 서버 별로 조금씩 다른 설정을 여러개의 파일로 관리 및 파일을 수정하고 반복적으로 build를 새로해야 하여 해당 문제를 개선하는 작업을 진행
공식문서
1. A /config subdir of the current directory.
2. The current directory
3. A classpath /config package
4. The classpath root
👉 위 순서대로 우선순위가 높음
➡️ 파일명은 구분하기 쉽게 배포 방식별로 작성: application-[name].properties
ex) application-dev.properties, application-open.properties
👌 Dspring.profiles.active 옵션을 사용하여 선택
// application.properties
- java -jar webViewer-0.0.1.war
// application-open.properties
- java -jar -Dspring.profiles.active=open webViewer-0.0.1.war
// application-dev.properties
- java -jar -Dspring.profiles.active=dev webViewer-0.0.1.war