W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
Turbine(由Spring Cloud Netflix項(xiàng)目提供)匯總了多個(gè)實(shí)例Hystrix指標(biāo)流,因此儀表板可以顯示匯總視圖。Turbine使用DiscoveryClient
接口查找相關(guān)實(shí)例。要將Turbine與Spring Cloud Consul結(jié)合使用,請(qǐng)以類(lèi)似于以下示例的方式配置Turbine應(yīng)用程序:
pom.xml。
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-turbine</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-discovery</artifactId> </dependency>
請(qǐng)注意,Turbine依賴(lài)項(xiàng)不是啟動(dòng)器。渦輪啟動(dòng)器包括對(duì)Netflix Eureka的支持。
application.yml。
spring.application.name: turbine applications: consulhystrixclient turbine: aggregator: clusterConfig: ${applications} appConfig: ${applications}
clusterConfig
和appConfig
部分必須匹配,因此將以逗號(hào)分隔的服務(wù)ID列表放入單獨(dú)的配置屬性中很有用。
Turbine。java。
@EnableTurbine @SpringBootApplication public class Turbine { public static void main(String[] args) { SpringApplication.run(DemoturbinecommonsApplication.class, args); } }
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話(huà):173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: