(十三)企业分布式微服务云SpringCloud SpringBoot mybatis-断路器聚合监控(Hystrix Turbine)

application.name: service-turbine
server:
  port: 8769
security.basic.enabled: false
turbine:
  aggregator:
    clusterConfig: default   # 指定聚合哪些集群,多个使用","分割,默认为default。可以使用http://.../turbine.stream?cluster={clusterConfig之一}访问
  appConfig: service-hi,service-lucy  ### 配置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: ABC
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/复制代码
复制代码

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

4、Turbine演示

依次开启eureka-server、service-hi、service-lucy、service-turbine工程。app

Spring Cloud大型企业分布式微服务云构建的B2B2C电子商务平台源码请加企鹅求求:一零三八七七四六二六
分布式

依次请求:微服务

http://localhost:8762/hi?name=forezp
 
http://localhost:8763/hi?name=forezp复制代码

1. 系统服务spa

2. 通用组件code

3. 业务服务cdn

Spring Cloud大型企业分布式微服务云构建的B2B2C电子商务平台源码请加企鹅求求:一零三八七七四六二六
server

相关文章
相关标签/搜索