国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > Java > 正文

spring cloud 的監控turbine-rabbitmq的示例

2024-07-14 08:40:32
字體:
來源:轉載
供稿:網友

前提是你已經有了注冊中心,然后搭建一個基礎spring cloud 服務,并配置注冊服務等等前提環境搭建

接下來描述的服務提供者和服務調用者的配置都是一樣的,來自《spring cloud 與 docker微服務架構實戰》的讀后的個人總結.

pom文件中需要引入spring-cloud-starter-hystrix/spring-cloud-starter-hystrix-dashboard/spring-cloud-netflix-hystrix-stream/spring-cloud-starter-turbine-stream/spring-cloud-starter-stream-rabbit
如下

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId></dependency><dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId></dependency><dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-hystrix-stream</artifactId></dependency><dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-turbine-stream</artifactId></dependency><dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId></dependency>

啟動類需要添加如下注解

/*turibine監控*/@EnableTurbineStream@EnableCircuitBreaker/*Dashboard監控*/@EnableHystrixDashboard

接下來的操作才是關鍵

1,將注冊中心 服務提供者 服務調用者 都啟動

2.訪問服務提供者 ip:port/hystrix 如圖

spring,cloud,turbine-rabbitmq,turbine,監控

3. 圖中總共有三個文本框,其中第一個文本框是必填的,填寫的是服務調用者的 ip:port/hystrix.stream,然后點擊Monitor Stream.

spring,cloud,turbine-rabbitmq,turbine,監控

4. 注意,如果第一個文本框填寫的不正確會展示如下內容

spring,cloud,turbine-rabbitmq,turbine,監控

5. 訪問服務調用者,當然,該服務調用者提供的接口需要調用服務提供者提供的接口的

6.這時候就能看到如下內容,就證明你成功了

spring,cloud,turbine-rabbitmq,turbine,監控

訪問hystrix.stream

訪問該連接時,想要出現如下的情況

spring,cloud,turbine-rabbitmq,turbine,監控

這個就要訪問服務提供者的 ip:port/hystrix.stream

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持VeVb武林網。


注:相關教程知識閱讀請移步到JAVA教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 神木县| 丘北县| 天柱县| 驻马店市| 济宁市| 龙里县| 阜康市| 石城县| 江北区| 兴隆县| 章丘市| 永昌县| 德兴市| 剑阁县| 新野县| 金平| 江华| 棋牌| 北川| 新营市| 二连浩特市| 永宁县| 南郑县| 大港区| 仁寿县| 当涂县| 金平| 稷山县| 唐河县| 冕宁县| 东城区| 阳高县| 遵化市| 和静县| 邛崃市| 聊城市| 黑河市| 渭源县| 宁城县| 高邮市| 兴仁县|