天天看点

08-01_SpringCloud_容错机制_RestTemplate服务降级8 Spring Cloud容错机制

8 Spring Cloud容错机制

8.1 RestTemplate服务降级

8.1.1 服务容错:Eureka Hystrix

  • 优先核心服务,非核心服务不可用或弱可用
  • @HystrixCommand注解来指定

如果被调用微服务应用模块并不是核心业务,对与该应用则需要进行降级熔断服务机制。

8.1.2 熔断机制服务操作步骤

第一步:在调用其他微服务应用的项目中引入Hystrix依赖包。

在member微服务中的pom.xml文件中引入Hystrix依赖包。

<!-- Hystrix引用 -->

<dependency>
    <groupId>org<
           

继续阅读