Hystrix-dashboard是一款針對Hystrix進行實時監控的工具,通過Hystrix Dashboard我們可以在直觀地看到各Hystrix Command的請求響應時間, 請求成功率等數據。
* [ ] Hystrix Dashboard
1、添加依賴
```
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
```
2、在啟動類上加上注解
```
@EnableHystrixDashboard
public class OrderApplication {
public static void main(String[] args) {
SpringApplication.run(OrderApplication.class, args);
}
}
```
3、在瀏覽器中進行訪問

在輸入框中填入相關信息:
:-: 
選擇單機版:http://hystrix-app:port/actuator/hystrix.stream
填寫對應的端口和ip,時間和應用名,即可進入主界面
:-: 
訪問下熔斷的接口:
:-: 
使用postman壓力測試:
:-: 
結果:
:-: 
錯誤次數累計,開始熔斷打開:
:-: 