zhudyos / duic-spring-cloud-config-client

Spring Cloud 分布式统一配置管理

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duic 配置中心 spring-cloud-config 工具包。

功能

  1. 加载 duic 配置。

  2. 更新配置。

  3. 支持 @Value 注入配置。

  4. 支持 @ConfigurationProperties 注入配置。

  5. 支持 spring-cloud 的 @RefreshScope 注解刷新配置。

示例

maven
<dependency>
  <groupId>io.zhudy.duic</groupId>
  <artifactId>duic-spring-cloud-config-client</artifactId>
  <version>2.0.2</version>
</dependency>
gradle
compile "io.zhudy.duic:duic-spring-cloud-config-client:2.0.2"
duic 服务配置 bootstrap.yml
duic:
  spring:
    cloud:
      config:
        uri: https://duic.zhudy.io/api/v1 # (1)
        name: samples                     # (2)
        profile: first,second             # (3)
        # token: [TOKEN]                  # (4)
  1. 应用名称,将作为 duic 的应用名称。

  2. duic 服务的 baseUri

  3. profile,多个采用 , 分隔。

  4. 如果指定的 profile 需要访问令牌认证时需配置 token,多个采用 , 分隔。

About

Spring Cloud 分布式统一配置管理

License:Apache License 2.0


Languages

Language:Java 100.0%