1. Introducing a configuration dependency apollo
<dependency> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo-client</artifactId> <version>1.1.0</version> </dependency>
2. Configure opened in the name of the application to add apollo
@EnableApolloConfig
3. Specify app.id and environment
-Dapp.id=YOUR-APP-ID -Denv=YOUR-ENVIRONMENT
4. Delete local profile
application.properties/application.yml
Or in the configuration file to add, let's take effect Configuration Center
apollo.bootstrap.enabled=true