72. 带 Hystrix 的断路器

通过在项目 pom.xml:spring-cloud-starter-hystrix中包含此启动器,应用程序可以使用 Spring Cloud Netflix 项目提供的 Hystrix 断路器。 Hystrix 不依赖 Netflix Discovery Client。 @EnableHystrix注解应放在配置类(通常是主类)上。然后可以用@HystrixCommandComments 方法,以使其受到断路器的保护。有关更多详细信息,请参见the documentation