
먼저 스프링 부트 application.properties에 아래와 같이 profiles를 정의한다.
> spring.profiles.active=dev
2.tomcat/bin 디렉토리에서 setenv 파일 작성
2.1 리눅스
setenv.sh 파일 생성 후 아래와 같이 작성
JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active={profile_name}"
2.2 Window
setenv.bat 파일 생성 후 아래와 같이 작성
JAVA_OPTS=%JAVA_OPTS% -Dspring.profiles.active={profile_name}
application.properties 구조