spring cloud hystrix
简介
hystrix通过服务隔离、熔断(也可以称为断路)、降级等手段控制依赖服务的延迟与失败。
netflix hystrix
本篇中主要讲解对spring cloud 对hystrix的集成,至于如何单独使用hystrix可以参考我分享的pdf.
spring cloud hystrix
引入依赖
<!--hystrix-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<!--hystrix-dashboard 监控-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
spring-cloud-starter-hystrix
核心jar
spring-cloud-starter-hystrix-dashboard
监控jar
EnableCircuitBreaker
使用EnableCircuitBreaker
或者 EnableHystrix
表明<