User Tools

Site Tools


config_分布式配置中心

This is an old revision of the document!


# spring cloud config 统一管理微服务配置 在微服务架构中,微服务的配置管理一般有以下需求:

  • 集中管理配置。
  • 不同环境,不同配置。
  • 运行期间可动态调整。
  • 配置修改后可自动更新。

spring cloud config 为分布式系统外部化配置提供了服务器端和客户端的支持,它包括 config server 和 config client 两部分。

  • 服务端:在启动类上添加注解 @EnableConfigServer,声明这是一个config server(config 服务端)。
  • 客户端:向 config server 中心注册。

下图是服务端和客户端相关配置:

config_分布式配置中心.1545440062.txt.gz · Last modified: 2021/02/10 21:29 (external edit)