1. 程式人生 > >springBoot Feign Hystrix Dashboard

springBoot Feign Hystrix Dashboard

1.引入依賴

<!-- 引入關於 hystrix Dashboard的依賴 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
            <version>2.0.2.RELEASE</version>
        </
dependency>

2.主函式加入註解

@EnableHystrix
@EnableHystrixDashboard

3.配置檔案actuator中開啟hystrix

management:
  endpoints:
    web:
      exposure:
        include: "*"
  server:
    port: 10114
    servlet:
      context-path: /
    ssl:
      enabled: false
  endpoint:
    health:
      show-details: always
    hystrix:
      stream:
        enabled: true

4.輸入http://192.168.9.6:10114/actuator/hystrix.stream 顯示

5.輸入http://192.168.9.6:8765/hystrix 顯示

6.填入http://192.168.9.6:10114/actuator/hystrix.stream 點選 Monitor Stream 顯示