It is a method to divide by environment such as cache setting during development with springBoot.
First, create application.yml for each environment and write the settings.
$ touch resources/application-dev.yml $ touch resources/application-test.yml
After that, add options when starting maven. Then application.yml for each environment will be loaded.
// application-dev.yml is loaded $ maven spring-boot:run -Drun.profiles=dev // application-test.yml is loaded $ maven spring-boot:run -Drun.profiles=test
Supplement: Spring Boot 2.0 migration is as follows.
$maven spring-boot:run -Dspring-boot.run.profiles=dev $maven spring-boot:run -Dspring-boot.run.profiles=test