初尝Spring Cloud Config
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的更多相关文章
- 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官方文档中文版-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 ...
- Spring Cloud Config - RSA简介以及使用RSA加密配置文件
简介 RSA非对称加密有着非常强大的安全性,HTTPS的SSL加密就是使用这种方法进行HTTPS请求加密传输的.因为RSA算法会涉及Private Key和Public Key分别用来加密和解密,所以 ...
- Spring Cloud Config 分布式配置中心使用教程
一.简介 在分布式系统中,由于服务数量巨多,为了方便服务配置文件统一管理,实时更新,所以需要分布式配置中心组件.在Spring Cloud中,有分布式配置中心组件spring cloud config ...
- 【spring实战第五版遇到的坑】第14章spring.cloud.config.uri和token配置项无效
本文使用的Spring Boot版本为:2.1.4.RELEASE Spring Cloud版本为:Greenwich.SR1 按照书上的做法,在application.yml中配置配置服务器的地址和 ...
随机推荐
- vue-cli 打包编译 -webkit-box-orient: vertical 被删除解决办法
前言 -webkit-box-orient: vertical在本地开发环境运行都没问题,一旦打包以后就会丢失 正文 原因: -webkit-box-orient: vertical 这个属性被 o ...
- 饮冰三年-人工智能-Python-19 Python网络编程
Socket:套接字.作用:我们只需要安照socket的规定去编程,就不需要深入理解tcp/udp协议也可以实现 1:TCP协议 1.1 客户端服务端循环收发消息 # 1:引入stock模块(导包) ...
- Conversation function
通过conversation function可以把类转成任意类型的值 #include <iostream> using namespace std; class Age { priva ...
- ubuntu+github配置使用
2015年底开始学习Python,接触了git这个东西,会基础的使用,顺便在github上注册了账号 https://github.com/haoxr 今天重新整理一下配置使用的整个流程 1 gith ...
- nginx+vsftp图片下载java代码上传
系统环境:阿里云centos7.3 安装nginx 查看nginx进程 ps aux|grep nginx 在/usr/local/nginx/sbin/目录下 nginx启动 ./nginx 快速停 ...
- Prime Distance POJ - 2689 (数学 素数)
The branch of mathematics called number theory is about properties of numbers. One of the areas that ...
- JAVA时间工具类,在维护的项目里的
package com.inspur.jobSchedule.util; import org.apache.commons.lang3.time.DateUtils; import org.apac ...
- mac下启动mysql
mac下使用mysql有点蛋疼,每次都要找命令.可能不同版本或者安装方式mysql的位置不太一样, 可以使用locate mysql.server查找一下. # start sudo /usr/loc ...
- Tornado-Form表单验证
基本思路 用户提交表单后,验证开始.页面中会有多个域要求验证,如text input,files, checkbox.同时,根据验证字段的不同,验证方式会有很多种,例如对邮箱.IP地址.电话的验证标准 ...
- 4、初识python
今天开始进行python的系统学习开始写随笔希望对看到的人有所帮助,写的不对的地方可以指出来大家共同进步. 预习: 1.安装python2和python3,实现多版本共存 2.用python语言编写代 ...