spring cloud-添加Hystrix Dashboard监控到系统中
前言
该示例是在
spring cloud-使用Hystrix实现单个方法的fallback
示例的基础上改进
一、添加依赖
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
- </dependency>
- @EnableHystrix
- @EnableHystrixDashboard
注意:端口号为具体服务对应的端口号而不是Eureka Server的端口号
在浏览器中多次刷新http://localhost:7904/get/2地址,会出现如下监控页面
官方Dashboard面板内容说明如下: