当前位置: 首页 > news >正文

佛山市平台购物网站制作公司wordpress标题相关

佛山市平台购物网站制作公司,wordpress标题相关,微网站运营,wordpress 路由自定义页面一、Hystrix Turbine简介 看单个的Hystrix Dashboard的数据并没有什么多大的价值,要想看这个系统的Hystrix Dashboard数据就需要用到Hystrix Turbine。Hystrix Turbine将每个服务Hystrix Dashboard数据进行了整合。Hystrix Turbine的使用非常简单,只需要…

一、Hystrix Turbine简介

看单个的Hystrix Dashboard的数据并没有什么多大的价值,要想看这个系统的Hystrix Dashboard数据就需要用到Hystrix Turbine。Hystrix Turbine将每个服务Hystrix Dashboard数据进行了整合。Hystrix Turbine的使用非常简单,只需要引入相应的依赖和加上注解和配置就可以了。

二、准备工作

本文使用的工程为上一篇文章的工程,在此基础上进行改造。因为我们需要多个服务的Dashboard,所以需要再建一个服务,取名为service-lucy,它的基本配置同service-hi,具体见源码,在这里就不详细说明。

三、创建service-turbine

引入相应的依赖:

<dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-turbine</artifactId></dependency></dependencies>

在其入口类ServiceTurbineApplication加上注解@EnableTurbine,开启turbine,@EnableTurbine注解包含了@EnableDiscoveryClient注解,即开启了注册服务。

@SpringBootApplication@EnableEurekaClient@EnableDiscoveryClient@RestController@EnableHystrix@EnableHystrixDashboard@EnableCircuitBreaker@EnableTurbinepublic class ServiceTurbineApplication {/*** http://localhost:8764/turbine.stream*/public static void main(String[] args) {SpringApplication.run( ServiceTurbineApplication.class, args );}}

配置文件application.yml:

spring:application.name: service-turbineserver:port: 8769security.basic.enabled: falseturbine:aggregator:clusterConfig: default   # 指定聚合哪些集群,多个使用","分割,默认为default。可使用http://.../turbine.stream?cluster={clusterConfig之一}访问appConfig: service-hi,service-la  ### 配置Eureka中的serviceId列表,表明监控哪些服务clusterNameExpression: new String("default")# 1. clusterNameExpression指定集群名称,默认表达式appName;此时:turbine.aggregator.clusterConfig需要配置想要监控的应用名称# 2. 当clusterNameExpression: default时,turbine.aggregator.clusterConfig可以不写,因为默认就是default# 3. 当clusterNameExpression: metadata['cluster']时,假设想要监控的应用配置了eureka.instance.metadata-map.cluster: ABC,则需要配置,同时turbine.aggregator.clusterConfig: ABCeureka:client:serviceUrl:defaultZone: http://localhost:8761/eureka/

配置文件注解写的很清楚。

Turbine演示


依次开启server、service-hi、service-la、service-turbine工程。
打开浏览器输入:http://localhost:8769/turbine.stream,

依次请求:

http://localhost:8762/hi?name=whhttp://localhost:8763/hi?name=wh


打开:http://localhost:8763/hystrix,输入监控流http://localhost:8769/turbine.stream

 

可以看到这个页面聚合了2个service的hystrix dashbord数据。

 

http://www.yayakq.cn/news/356020/

相关文章:

  • Delphi 网站开发框架怎么做网页游戏平台
  • 创建个人网站教程网站设计特别好的公司
  • 自学建网站做网站优化网站怎么创建自己的网站
  • 中国网站排名WordPress stock
  • 企业网站模板中文 产品列表竞价代运营
  • 石家庄自己怎么做网站啊网站开发哪里培训好
  • 网站编辑如何做管理系统登录
  • 嘉兴网页制作网站排名卖文章的网站源码
  • 用什么软件做动漫视频网站好哈尔滨电商网站建设
  • 网站建设自检自查佛山有那些定制网站建设公司
  • 国内网站建设排名贵州省冶金建设有限公司网站
  • 笔记本做系统哪个网站好做分销系统
  • 做柜子喜欢上哪些网站看如何提升网站排名
  • 国家建设局网站首页静态网站论文目录
  • 新手学做网站txt中国十大门户网站排行
  • 私人定制哪个网站做的比较好登录百度账号
  • 建设部规范网站重庆企业型网站建设
  • 网站开发南城科技大厦网站建设维护职责
  • 哈尔滨优质的建站销售价格怎样做免费网站建设
  • 淄博网站建设服务商wordpress支付通道
  • 织梦网站定制电商赚钱吗
  • 北京保障房建设网站做编程的+网站有哪些内容
  • 各个做网站的有什么区别培训中心网站建设
  • 网站首页被k还有救吗站长工具网
  • 网站制作推广方案wordpress引用js代码
  • 2345网址导航下载到桌面单页站好做seo吗
  • 计算机应用教程 网站的建设与维护网站建设信息
  • 做外贸网站建设如何做免费网站
  • 网站优化查询北戴河网站建设
  • 怎样做不用备案的网站黑帽seo之搜索引擎