Spring Cloud 微服务架构学习

Spring Cloud构建微服务架构之配置中心

2018-07-04  本文已影响0人  SnowZhang

通过前面几篇文章的学习我们已经学会如何构建服务注册中心,服务发现与消费。本节我们介绍什么是spring cloud 配置中心,并学会如何使用spring-cloud-config 搭建一个分布式服务器的配置中心。

什么是Spring Cloud Config

spring官方对spring cloud config是这么定义的:

Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a central place to manage external properties for applications across all environments.

大概的意思就是,Spring Cloud Config 将原本需要放在本地的配置文件,都几种配置到服务端了,也就是我们所说的配置中心。然后依赖这些配置的应用作为客户端,来动态的从配置中心读取配置。

Spring Cloud Config工作流程

Spring Cloud Config提供基于以下3个维度的配置管理:

工作流程

首先看下面的Spring Cloud Config 配置文件读取流程


springcloudconfig.png

上图简要描述了SpringCloudConfig的工作流程,图中主要包含四个元素

上一篇下一篇

猜你喜欢

热点阅读