(十三)企業分佈式微服務雲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

相關文章
相關標籤/搜索