前言
上一篇SpringCloud(三):Hystrix服务降级与熔断介绍了 Hystrix 断路器原理、常用配置以及一个配置实例。本篇介绍Hystrix仪表盘组件 Hystrix Dashboard,用于实时监控HystrixCommand方法的执行情况。
Hystrix单实例监控
创建 cloud-hystrix-dashboard 模块,引入相关依赖如下:
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
<version>2.2.10.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools<