1,下载源码

地址https://spring.io/guides/gs/centralized-configuration/

2,导入工程

解压后分别把Server端与Client端导入到两个Eclipse中,以便测试

3,修改源码中pom.xml为如下形式

    <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

4,修改Server端配置,采用本地仓库

spring.cloud.config.server.git.uri=d:/config

5,创建本地仓库

在d:\config目录新增文件a-bootiful-client.properties,文件内容只需一行

message = Hello Terry

在dos下下执行git命令

git init;

git add a-bootiful-client.properties

git commit -m 'first bommit'

6,启动服务端以及客户端,访问http://localhost:92/message,就能看到程序运行结果

参照文档:https://spring.io/guides/gs/centralized-configuration/

初尝Spring Cloud Config的更多相关文章

  1. spring cloud config 入门

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

  2. Spring Cloud Config

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

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

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

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

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

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

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

  6. 搭建spring cloud config

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

  7. Spring Cloud Config - RSA简介以及使用RSA加密配置文件

    简介 RSA非对称加密有着非常强大的安全性,HTTPS的SSL加密就是使用这种方法进行HTTPS请求加密传输的.因为RSA算法会涉及Private Key和Public Key分别用来加密和解密,所以 ...

  8. Spring Cloud Config 分布式配置中心使用教程

    一.简介 在分布式系统中,由于服务数量巨多,为了方便服务配置文件统一管理,实时更新,所以需要分布式配置中心组件.在Spring Cloud中,有分布式配置中心组件spring cloud config ...

  9. 【spring实战第五版遇到的坑】第14章spring.cloud.config.uri和token配置项无效

    本文使用的Spring Boot版本为:2.1.4.RELEASE Spring Cloud版本为:Greenwich.SR1 按照书上的做法,在application.yml中配置配置服务器的地址和 ...

随机推荐

  1. Java Spring Boot VS .NetCore (一)来一个简单的 Hello World

    系列文章 Java Spring Boot VS .NetCore (一)来一个简单的 Hello World Java Spring Boot VS .NetCore (二)实现一个过滤器Filte ...

  2. [原创]iFPGA-Cable FT2232H JTAG & UART调试器

    iFPGA-Cable FT2232H JTAG & UART调试器 [特性] 采用FT2232H,双通道接口: 支持UART: 支持JTAG,Digilent SMT-1,TCK最大时钟频率 ...

  3. [原创]FPGA JTAG工具设计(一)

    先来看不同JTAG方案,下载配置QSPI Flash所耗时间 基于FTDI方案,JTAG下载时间为494sec JTAG chain configuration ------------------- ...

  4. Logstash利用ruby将有用的日志放到一个ES_INDEX将无用的日志放到另一个ES_INDEX

    input{ kafka { bootstrap_servers => "127.0.0.1:9092" client_id => "nginxlog&quo ...

  5. day14.生成器迭代器作业

    1.写生成器,从文件中读取内容,再每一行读取的内容前加上 ‘***’之后返回给用户 def func(filename): word = input('输入你想找的内容:') with open(fi ...

  6. 网络编程-Python高级语法-深浅拷贝

    知识点:深浅拷贝,浅拷贝拷贝的是最顶层的东西,深拷贝是拷贝最深层的东西,光说可能理解不了,看下图 1.拷贝可变类型 2.拷贝不可变类型 3.拷贝元祖,元组内数据是可变类型

  7. Flex核心属性整理

    main axis和cross axis的位置不一定是水平和垂直的,以flex-direction的值即为主轴方向 justify-content:主轴对齐方式 space-between:将多余空间 ...

  8. CSSposition属性

    基本html文本 1.  position-static #part1{ width:  200px; height:  200px; background:  gold; } #part2{ pos ...

  9. [LeetCode] Search in a Binary Search Tree 二叉搜索树中搜索

    Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST ...

  10. react-redux简单的记事本应用

    首先给大家普及一个方法: let data = [ {id:1,text:'手机',check:false}, {id:2,text:'电脑',check:false}, {id:3,text:'平板 ...