详细参见

《Spring Cloud 与 Docker微服务架构实战》

p163-9.10 Spring Cloud Config 与 Eureka 配合使用

p163-9.12 ConfigServer 的高可用

1、关键是添加 eureka 注册中心功能

别忘了添加包

别忘了添加@注解,服务器添加EnableEurekaServer 客户端添加 @EnableDiscoveryClient

2、客户端变更一下原来连接 配置服务器的配置。

      discovery:
enabled: true # 开启
service-id: thunisoft-microservice-configs # 配置服务的 spring.application.name
spring:
application:
name: thunisoft-microservice-foo
cloud:
config:
#uri: http://localhost:8979/
profile: dev
label: master
discovery:
enabled: true
service-id: thunisoft-microservice-configs
# rabbitMQ
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
encrypt:
key: rootroot
# eureka
eureka:
client:
service-url:
defaultZone: http://localhost:12345/eureka

  

Spring Cloud Config 配置中心高可用的更多相关文章

  1. 跟我学SpringCloud | 第七篇:Spring Cloud Config 配置中心高可用和refresh

    SpringCloud系列教程 | 第七篇:Spring Cloud Config 配置中心高可用和refresh Springboot: 2.1.6.RELEASE SpringCloud: Gre ...

  2. 微服务SpringCloud之Spring Cloud Config配置中心Git

    微服务以单个接口为颗粒度,一个接口可能就是一个项目,如果每个项目都包含一个配置文件,一个系统可能有几十或上百个小项目组成,那配置文件也会有好多,对后续修改维护也是比较麻烦,就和前面的服务注册一样,服务 ...

  3. spring cloud --- config 配置中心 [本地、git获取配置文件]

    spring boot      1.5.9.RELEASE spring cloud    Dalston.SR1 1.前言 spring cloud config 配置中心是什么? 为了统一管理配 ...

  4. 微服务SpringCloud之Spring Cloud Config配置中心服务化

    在前面两篇Spring Cloud Config配置中心的博客中都是需要指定配置服务的地址url:spring.cloud.config.uri,客户端都是直接调用配置中心的server端来获取配置文 ...

  5. Spring Cloud Config 配置中心实践过程中,你需要了解这些细节!

    本文导读: Spring Cloud Config 基本概念 Spring Cloud Config 客户端加载流程 Spring Cloud Config 基于消息总线配置 Spring Cloud ...

  6. Spring Cloud Config 配置中心

    请将远程配置文件的格式写对: 比如使用 *.yml 或者 *.properties yml: testconfig: testvalue properties: testconfig=testvalu ...

  7. 微服务SpringCloud之Spring Cloud Config配置中心SVN

    在回来的路上看到一个个的都抱着花,吃了一路的狗粮,原本想着去旁边的工业园里跑跑步呢,想想还是算了,人家过七夕,俺们过巴西.上一博客学习了Spring Cloud Config使用git作为配置中心,本 ...

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

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

  9. Spring Cloud Config 配置中心 自动加解密功能 jasypt方式

    使用此种方式会存在一种问题:如果我配置了自动配置刷新,则刷新过后,加密过后的密文无法被解密.具体原因分析,看 SpringCloud 详解配置刷新的原理 使用  jasypt-spring-boot- ...

随机推荐

  1. extjs4学习-01-准备工作

    想学习这个,在这里做个笔记. 创建了svn管理,路径http://ip:端口/repos/doc_jnfwz/liuzhenming/extjs4/extjs4 eclipse 中安装插件,支持在js ...

  2. Hadoop 读取文件API报错

    Exception in thread "main" org.apache.hadoop.hdfs.BlockMissingException: Could not obtain ...

  3. 2. Apache Axis2 快速学习手册之概览

    这篇博文和大家一起学习下Apache Axis2 官方文档的快速指南篇 英文原文:http://axis.apache.org/axis2/java/core/docs/quickstartguide ...

  4. Struts2对值的推断

    目的是想将jsp中的input输入: <input class="inputstyle" type="text" value="<s:pr ...

  5. 服务器有无中木马前期诊断 注意:wget最好是从服务器上卸载掉,因为多数情况是wget下载木马到服务器的

    # rpm -qf /usr/bin/wget wget-.el6_6..x86_64 rpm -e --nodeps wget 有无下列文件: cat /etc/rc.d/init.d/selinu ...

  6. 菜鸟学EJB(一)——第一个实例

    EJB用了那么长时间了,从来没写过关于它的东西,挺对不住它的.今天先写一个简单的小实例,虽然小但是却能体现出EJB的核心——分布式.我们可以将业务逻辑的接口跟实现部署到一台机器上,将调用它们的客户端部 ...

  7. java: 保留两位小数4种方法

    import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; public c ...

  8. Flink connectedstreams

    https://stackoverflow.com/questions/40613684/apache-flink-scope-of-valuestate-in-connectedstreams ht ...

  9. zookeeper的原理讲解

    留着以后看:http://blog.csdn.net/u010311445/article/category/1677839

  10. Python处理大数据

    起因 Python处理一下数据,大概有六七个G,然后再存到另外一个文件中,单线程跑起来发现太慢了,数据总量大概是千万行的级别,然后每秒钟只能处理不到20行--遂想怎么提高一下速度 尝试1-multip ...