Profiles placeholder
1, a random number
2, the configuration of the placeholder value acquired previously, may be used if no: to specify default values
Profile
1, multi-file Profile
We in the preparation of the master configuration file, the file name can be application- {profile} .properties / yml
Application.properties use the default configuration;
2, yml support multiple block the way
3, activate the specified profile
1, specified in the configuration file --spring.profiles.active = dev
2, the command line:
java -jar spring-boot-02-config-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev;
Directly in the test, configure incoming command line parameters
3, the virtual machine parameters;
-Dspring.profiles.active=dev