Multi-environment configuration

1. When using the properties file, you can create multiple application-{profiles}.properties files, and then in the main configuration file, you can choose which configuration file to use to activate

2. When using the yml file, you can use --- to divide the configuration file into multiple blocks, each block with spring:profiles: prod named, then in the first block use
spring:profiles:active: prod chooses which block to activate.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839259&siteId=291194637