Spring Cloud中如何断路器聚合监控
发表于:2025-02-20 作者:千家信息网编辑
千家信息网最后更新 2025年02月20日,Spring Cloud中如何断路器聚合监控,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。一、准备工作把以前的项目 se
千家信息网最后更新 2025年02月20日Spring Cloud中如何断路器聚合监控
Spring Cloud中如何断路器聚合监控,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。
一、准备工作
把以前的项目 service-feign 进行同样的改造。
二、新建maven项目service_turbine
1、新建pom.xml
4.0.0 wg service_turbine 0.0.1-SNAPSHOT jar service_turbine http://maven.apache.org UTF-8 UTF-8 Greenwich.RELEASE 1.8 org.springframework.boot spring-boot-starter-parent 2.1.1.RELEASE org.springframework.boot spring-boot-starter-actuator org.springframework.cloud spring-cloud-starter-netflix-hystrix org.springframework.cloud spring-cloud-starter-netflix-hystrix-dashboard org.springframework.cloud spring-cloud-starter-netflix-eureka-client org.springframework.boot spring-boot-starter-web org.springframework.cloud spring-cloud-starter-openfeign org.springframework.cloud spring-cloud-starter-netflix-turbine junit junit test org.springframework.cloud spring-cloud-dependencies ${spring-cloud.version} pom import
2、新建ServiceTurbineApplication.java
package wg;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;import org.springframework.cloud.client.discovery.EnableDiscoveryClient;import org.springframework.cloud.netflix.eureka.EnableEurekaClient;import org.springframework.cloud.netflix.hystrix.EnableHystrix;import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;import org.springframework.cloud.netflix.turbine.EnableTurbine;import org.springframework.cloud.openfeign.EnableFeignClients;@SpringBootApplication@EnableEurekaClient@EnableDiscoveryClient@EnableFeignClients@EnableHystrix@EnableHystrixDashboard@EnableCircuitBreaker@EnableTurbinepublic class ServiceTurbineApplication { public static void main(String[] args) { SpringApplication.run( ServiceTurbineApplication.class, args ); }}
3、新建application.yml
server: port: 8767spring: application: name: service-turbineeureka: client: serviceUrl: defaultZone: http://localhost1:8761/eureka/,http://localhost2:8861/eureka/management: endpoints: web: exposure: include: "*" cors: allowed-origins: "*" allowed-methods: "*"turbine: app-config: service-feign,service-ribbon aggregator: clusterConfig: default clusterNameExpression: new String("default") combine-host: true instanceUrlSuffix: default: actuator/hystrix.stream
4、启动项目,访问:http://localhost:8767/turbine.stream
5、访问:http://localhost:8764/hystrix ,填写内容
6、点击监控,然后访问:http://localhost:8765/hello,http://localhost:8764/hello
看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对的支持。
项目
监控
内容
UTF-8
帮助
断路器
清楚
对此
文章
新手
更多
知识
行业
资讯
资讯频道
难题
需求
频道
进一
准备
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全发挥审判职能
苏州科达软件开发工资
我的世界1.16拔刀剑服务器
网络安全提案一览表
NI软件开发规范
连接服务器失败状态
网络安全的底座
16视图数据库技术
电脑服务器需要硬盘通道吗
高德科技互联网公司
赣州智美互联网科技有限公
数据库索引desc
湖北工业软件开发价格大全
软件开发管理互联网
网络安全设备 七层 哪层
网络安全与数字化创新
杭州同欣网络技术有限公司运输
数字货币属于网络安全吗
狂野飙车8服务器在哪
全局权限数据库权限
器 美国vps云服务器 网站群
基金数据库哪家比较好
奥林软件开发怎么样
benchmark数据库应用
嵌入式软件开发定做
吴爱芳网络技术部
灵武政务软件开发公司价格
数据库复制与备份
数据库 教学管理 G
六安oa管理软件开发哪家好