1、apolo的github上的文檔很全,大家可以去github上查看下面是java客戶端使用文檔
2、公司apollo
賬號:demo
密碼:123456
3、我這邊寫了個demo(spring和springBoot對接apollo的簡單demo)
代碼地址:git@gitlab.homedo.com:microservice/apollo-demo.git
java在使用過程中如果使用@ConfigurationProperties的時候需要注意一下(修改值自后不會自動變更)
@ConfigurationProperties
如果需要在Apollo配置變化時自動更新注入的值,需要配合Spring Cloud的RefreshScope使用。相關代碼實現,可以參考apollo-demo項目中的SampleRedisConfig.java和SpringBootApolloRefreshConfig.java
對apollo的版本進行了升級
如果客戶端要升級的話 把原來apollo-client的依賴改一下,改成如下就可以了
<dependency>
<groupId>com.homedo</groupId>
<artifactId>homedo-apollo-client</artifactId>
<version>2.1.1</version>
</dependency>