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