Generally, we will provide several sets of actual development environment in the configuration file, the format is probably as follows:
applcation.properties
application-dev.properties
application-test.properties
application-prod.properties
By way of using the profile, generally defined in applcation.properties spring.profiles.active variable values, such as want to open development environment's configuration file:
spring.profiles.active = prod
This is a personal feeling relatively simple method.