spring-cloud-config笔记
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笔记的更多相关文章
- SpringCloud学习笔记(7):使用Spring Cloud Config配置中心
简介 Spring Cloud Config为分布式系统中的外部化配置提供了服务器端和客户端支持,服务器端统一管理所有配置文件,客户端在启动时从服务端获取配置信息.服务器端有多种配置方式,如将配置文件 ...
- Spring Cloud学习笔记【九】配置中心Spring Cloud Config
Spring Cloud Config 是 Spring Cloud 团队创建的一个全新项目,用来为分布式系统中的基础设施和微服务应用提供集中化的外部配置支持,它分为服务端与客户端两个部分.其中服务端 ...
- 分布式配置中心:Spring Cloud Config
最近在学习Spring Cloud的知识,现将分布式配置中心:Spring Cloud Config的相关知识笔记整理如下.[采用 oneNote格式排版]
- spring cloud config 入门
简介 Spring cloud config 分为两部分 server client config-server 配置服务端,服务管理配置信息 config-client 客户端,客户端调用serve ...
- Spring Cloud Config
Spring Cloud Config provides server and client-side support for externalized configuration in a dist ...
- Spring Cloud 学习笔记(一)——入门、特征、配置
[TOC] 0 放在前面 0.1 参考文档 http://cloud.spring.io/spring-cloud-static/Brixton.SR7/ https://springcloud.cc ...
- Spring Cloud官方文档中文版-Spring Cloud Config(上)
官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#spring-cloud-feign 文中例子我做了一些测试在:http ...
- Spring Cloud官方文档中文版-Spring Cloud Config(下)-客户端等
官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_serving_alternative_formats 文中例子我做了 ...
- SpringCloud的配置管理:Spring Cloud Config
演示如何使用ConfigServer提供统一的参数配置服务 ###################################################################一.概 ...
- 搭建spring cloud config
很久没更新了,因为不是专职研究spring cloud,因此更新速度得看工作强度大不大,每天能抽出的时间不多,如果更新太慢了,并且有小伙伴看的话,请见谅了. Spring Cloud简介 Spring ...
随机推荐
- #Java Web累积#表格<table>中隐藏列做备用数据
初入JW,MyEclipse,JS文件中码砖时怎么连个提示都没有. 步骤1 JSP代码中,Table多出一列,如下列代码中的 Other,其中css文件中将col00的width设置为0px; < ...
- OpenVPN记住账号密码自动连接
说明:在增加了证书+账号密码之后,安全性确实提高了,但是面临的问题也有,每次重启时必须输入账号密码才能连接,这也造成了无人值守的问题. 解决: 1.在Client的client.ovpn末尾添加一行a ...
- Web安全测试指南--信息泄露
5.4.1.源代码和注释: 编号 Web_InfoLeak_01 用例名称 源代码和注释检查测试 用例描述 在浏览器中检查目标系统返回的页面是否存在敏感信息. 严重级别 中 前置条件 1. 目标we ...
- System.Object 基类
System.Object在.Net中是所有类型的基类,任何类型都直接或间接地继承自System.Object.没有指定基类的类型都默认继承于System.Object. 基类特性 正由于所有的类型都 ...
- java自带的jvm分析工具
http://domark.iteye.com/blog/1924302 这段时间觉得很有必要对java的内存分析工具进行熟悉,这样以后出现机器负载较高,或者反应很慢的时候,我就可以查找原因了.上 ...
- Objective-C字面量语法总结
通常情况下,创建数组,字典的时候需要写一些很长的方法名,今天就总结一下如何使用字面量语法代替这些方法. 1.数值的创建 NSNumber *number1 = [NSNumber numberWith ...
- oracle 查看执行最慢 sql
查询执行最慢的sql select * from (select sa.SQL_TEXT, sa.SQL_FULLTEXT, sa.EXECUTIONS "执行次数", round ...
- third-maximum-number
https://leetcode.com/problems/third-maximum-number/ // 开始我以为相同的也占一位,比如5,3,3,2,得出3,但是答案是需要2 public cl ...
- [TypeScript] Type Definitions and Modules
For example you are building your own module, the same as Lodash: my-lodash.d.ts declare module &quo ...
- JVM性能监控工具(一)-jdk命令行工具
转载:http://blog.csdn.net/top_code/article/details/51456186 当系统出bug需要定位问题的时候,知识.经验是关键基础,数据是依据,工具是运用知识处 ...