I'm using spring boot and application.properties
to select a database during development by @Configuration @Profile("dev")
.
spring.profiles.active=dev
spring.config.location=file:d:/application.properties
During production I'd like to create a file outside of the application context that should be loaded and then active a different configuration profile, with d:/application.properties:
spring.profiles.active=production
Result: when I start the app, the configuration is still dev
, so somehow the additional location of the productive properties file is not taken into account. Am I missing anything?
spring boot 1.1.0.BUILD-SNAPSHOT
Note: this question is NOT about tomcat.