Skip to content

Instantly share code, notes, and snippets.

@daemin-hwang
Last active January 26, 2016 02:10
Show Gist options
  • Save daemin-hwang/90991444154f7cc5dfb6 to your computer and use it in GitHub Desktop.
Save daemin-hwang/90991444154f7cc5dfb6 to your computer and use it in GitHub Desktop.
spring boot application.properties 설정
spring boot application.properties 에서 프로파일별 로딩 설정시에
logback.xml 내에 명시되어있는 resource 경로를 명시해줘야함.
"application-dev.properties" 파일을 로드 하고자 하면
JVM 아규먼트를 "-Dspring.profiles.active=dev" 와 같이 던지고
logbak.xml 내 설정을
<property resource="application-${spring.profiles.active}.properties" /> 와 같이 작성한다.
라이브러리 디펜던시 필요 :
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>2.6.1</version>
</dependency>
참고링크 :
http://stackoverflow.com/questions/31017064/how-to-externalize-spring-boot-application-properties-to-tomcat-lib-folder
http://lng1982.tistory.com/165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment