Circuit Breaker: Hystrix Dashboard (断路器:hystrix 仪表盘)

基于service-ribbon 改造下:

pom.xml加入:

    <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>

在主程序入口中加入@EnableHystrixDashboard注解,开启hystrixDashboard:

@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableHystrixDashboard
public class ServiceRibbonApplication { public static void main(String[] args) {
SpringApplication.run(ServiceRibbonApplication.class, args);
} @Bean
@LoadBalanced
RestTemplate restTemplate() {
return new RestTemplate();
} }

打开浏览器:访问http://localhost:8764/hystrix,界面如下:

点击monitor stream,进入下一个界面,访问:http://localhost:8764/hi?name=forezp访问ribbon负载一个请求

此时会出现监控界面:

最新文章

  1. 微信小程序-视图模板
  2. 44、NLP的其他分词功能测试
  3. emacs 新手笔记(三) —— 为 emacs 做一点简单的定制
  4. 字符编码详解及由来(UNICODE,UTF-8,GBK)
  5. 开发BI系统时的需求分析研究
  6. Bulk Insert &amp; BCP执行效率对比(续)
  7. 开源免费跨平台opengl opencv webgl gtk blender, opengl贴图程序
  8. PHP新手之学习类与对象(1)
  9. vue入门 vue与react和Angular的关系和区别
  10. svg-写一个简单的进度条
  11. SDP(12): MongoDB-Engine - Streaming
  12. 【STM32H7教程】第3章 STM32H7整体把控
  13. 复制命令(ROBOCOPY)
  14. word插入公式不自动斜体的解决办法
  15. hbase 快速开发
  16. Yii restful api跨域
  17. js 弹窗的实现
  18. px 和 em 的区别
  19. android笔记--加载框
  20. 基于nginx-rtmp-module模块实现的HTTP-FLV直播模块(nginx-http-flv-module)

热门文章

  1. hive通过spark导入hbase
  2. bzoj 2067 [Poi2004]SZN——二分+贪心
  3. Day07:常用模块,面向对象编程(对象&amp;类)及内置函数
  4. Tomcat访问程序外的上传文件
  5. Git的使用 强制放弃本地所有修改,获取master中最新版本更新本地
  6. 使用go实现基于命令行的计算器程序
  7. spring-boot-starter-data-redis学习笔记01
  8. 洛谷P4568 飞行路线
  9. Eclipse中各图标含义
  10. JavaScript进阶 - 第4章 跟着我的节奏走(流程控制语句)