springboot project using the apollo Configuration Center

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

 

Guess you like

Origin www.cnblogs.com/zhaopengcheng/p/11917674.html