忽略元数据末尾

回到原数据开始处

spring-cloud-config 简单来讲就是spring-cloud实现的分布式配置中心.与之前介绍的开源配置服务方案 disconf是一样的,spring-cloud-config分为服务与客户两端

spring-cloud-config 使用git或者svn 甚至是本地的文件系统作为配置文件的仓库

spring-cloud-config 用application,profile,label 三个维度来实现分布式配置管理和发布.

application  : 使用spring-cloud-config服务的客户端名称

profile :  这个很好理, manve的profile概念基本一致 可以理解成环境

lable  :  这个可以理解成版本,如果使用的是git作为配置管理的仓库,label可以是分支名,tag的名称

spring-cloud-config的原理就是 将远程git仓库中的配置文件clone到本地临时目录并加载至内存中

spring-cloud-config客户端通过URL的形式来获取配置,spring官网的介绍如下

   /{application}/{profile}[/{label}]    /{application}-{profile}.yml    /{label}/{application}-{profile}.yml    /{application}-{profile}.properties    /{label}/{application}-{profile}.properties

客户端可以通过http GET 请求直接获取spring-cloud-server的配置,实际应用中则不需要这样获取,只需要配置服务的host即可,如果使用Eureka,则只需要配置服务端的服务即可

与开源方案disconf的对比

控制台:

disconf : 拥有自己的web界面管理配置

spring-cloud-config: 没有web界面维护配置,主要靠git,svn等操作管理配置

推拉模型:

disconfi: 通过zookeeper实现推模型,拉模型

spring-cloud-config: 通过git,svn实现 推拉模型

配置存储:

disconf: 通过数据库存储配置

spring-cloud-config:通过git,以及本地文件的形式存储配置文件

配置管理及发布:

disconf : 拥有 环境,app,version 管理及发布配置.

spring-cloud-config :  通过 application,profile , label 管理发布配置

部署:

disconf: web程序,既是控制台也是服务,高可用方案依赖nginx,zookeeper

spring-cloud-config: spring-boot程序, 高可用方案依赖spring-cloud技术方案

通过对比,disconf的优势是管理配置简单,而spring-cloud-config的优势是与我们的spring-cloud技术方案完美的集成,不需要单独的考虑高可用方案

而且spring-cloud-config部署方式也优于disconf,使用git对于程序员非常的熟悉,而且git天生对版本的支持也是spring-cloud-config的优势 鸣谢崔老大.

spring-cloud-config笔记的更多相关文章

  1. SpringCloud学习笔记(7):使用Spring Cloud Config配置中心

    简介 Spring Cloud Config为分布式系统中的外部化配置提供了服务器端和客户端支持,服务器端统一管理所有配置文件,客户端在启动时从服务端获取配置信息.服务器端有多种配置方式,如将配置文件 ...

  2. Spring Cloud学习笔记【九】配置中心Spring Cloud Config

    Spring Cloud Config 是 Spring Cloud 团队创建的一个全新项目,用来为分布式系统中的基础设施和微服务应用提供集中化的外部配置支持,它分为服务端与客户端两个部分.其中服务端 ...

  3. 分布式配置中心:Spring Cloud Config

    最近在学习Spring Cloud的知识,现将分布式配置中心:Spring Cloud Config的相关知识笔记整理如下.[采用 oneNote格式排版]

  4. spring cloud config 入门

    简介 Spring cloud config 分为两部分 server client config-server 配置服务端,服务管理配置信息 config-client 客户端,客户端调用serve ...

  5. Spring Cloud Config

    Spring Cloud Config provides server and client-side support for externalized configuration in a dist ...

  6. Spring Cloud 学习笔记(一)——入门、特征、配置

    [TOC] 0 放在前面 0.1 参考文档 http://cloud.spring.io/spring-cloud-static/Brixton.SR7/ https://springcloud.cc ...

  7. Spring Cloud官方文档中文版-Spring Cloud Config(上)

    官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#spring-cloud-feign 文中例子我做了一些测试在:http ...

  8. Spring Cloud官方文档中文版-Spring Cloud Config(下)-客户端等

    官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_serving_alternative_formats 文中例子我做了 ...

  9. SpringCloud的配置管理:Spring Cloud Config

    演示如何使用ConfigServer提供统一的参数配置服务 ###################################################################一.概 ...

  10. 搭建spring cloud config

    很久没更新了,因为不是专职研究spring cloud,因此更新速度得看工作强度大不大,每天能抽出的时间不多,如果更新太慢了,并且有小伙伴看的话,请见谅了. Spring Cloud简介 Spring ...

随机推荐

  1. 浅析position:relative position:absolute

    定位一直是WEB标准应用中的难点,如果理不清楚定位那么可能应实现的效果实现不了,实现了的效果可能会走样.如果理清了定位的原理,那定位会让网页实现的更加完美. 定位的定义: 在CSS中关于定位的内容是: ...

  2. ScrewTurn Wiki 详细安装(.net 版本下的免费wiki) 步骤

    首先看下官网: http://www.sunhorizon.info/Default.aspx  1.下载和安装                                            ...

  3. 调整Chrome中文字体为雅黑

    几天试了一下Chrom发布的Chrome 37,感觉所谓的Direct2D渲染还是有些效果的,但这只体现在英文上,中文的宋体还是非常的不舒服,便试着将其替换成了雅黑,这里介绍一下相关方法. Chrom ...

  4. 调用wsdl的接口-用axis

    // 创建一个服务(service)调用(call) org.apache.axis.client.Service service = new org.apache.axis.client.Servi ...

  5. easyui-combobox绑定回车事件注意事项

    回车事件的定义的位置必须是easyui-combobox数据加载的后面,才有效果. HTML文件: <select id="aucBrandNo" class="e ...

  6. sql server触发器复制记录

    Create Trigger test_tri5 on test after insert as begin declare @id sysname, @tel sysname, @name sysn ...

  7. 理解Vue的计算属性

    计算属性是一个很邪门的东西,只要在它的函数里引用了 data 中的某个属性,当这个属性发生变化时,函数仿佛可以嗅探到这个变化,并自动重新执行. 上述代码会源源不断的打印出 b 的值.如果希望 a 依赖 ...

  8. elasticsearch java客户端api使用(一)

    1.客户端client构建 ​ package com.pz998.app.service.utils; import static org.elasticsearch.common.settings ...

  9. iOS Mapkit 定位REGcode地理位置偏移

    在iOS上,使用系统Mapkit定位,获取到的坐标会有偏移: 今有需求,用系统Mapkit定位,并Regcode出实际地理位置,修正偏移: 解决方案: 使用MapView的代理 - (void)map ...

  10. 用Markdown写博客快速入门

    Markdown,简单来说,就是一种可以方便转换为HTML的带标记符号纯文本. 它是对我等键盘党的福音:我不用再费劲挪动鼠标去按加粗.设置段落了,用键盘输入所有文本,一气呵成. 最重要的是,cnblo ...