微服务 Spring Boot 2.0 + Spring cloud + consul + Hystrix + zuul + config + feign (二)

微服务 Spring Boot 2.0 + Spring cloud + consul + Hystrix + zuul + config + feign (一)

上篇介绍:consul 安装,spring boot 2.0 使用,ribbon,feign 调用接口。

接下来还有目录结构:

  1. config:配置中心(本篇)
  2. zuul :网关总线
  3. hystrix:断路保护机制
  4. sleuth+zipkin:链路追踪系统(sleuth 不了解的可以看看这篇简介:sleuth 简介

1.配置中心

spring boot 2.0 快速搭建:

没有别的,只要 pom 中引入下列依赖,然后两步;

  1. 注册到 consul
  2. 添加 @EnableConfigServer 注解;
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-server</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.sp
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值