Spring-boot utilizes Spring profiles (http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html) which allow for instance to have separate co
Add spring.profiles.active=tests
in your application.properties file, you can add multiple properties file in your spring boot application like application-stage.properties
, application-prod.properties
, etc. And you can specify in your application.properties file while file to refer by adding spring.profiles.active=stage
or spring.profiles.active=prod
you can also pass the profile at the time running the spring boot application by providing the command:
java -jar
-Dspring.profiles.active=local
build/libs/turtle-rnr-0.0.1-SNAPSHOT.jar
According to the profile name the properties file is picked up, in the above case passing profile local
consider the application-local.properties
file