#java# Hystrix短路器Dashboard儀表盤

- 添加依賴
	<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-hystrix-dashboard -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
            <version>1.4.7.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>1.5.9.RELEASE</version>
        </dependency>
- 啓動類增加註解
	@EnableHystrixDashboard
- 配置文件增加endpoint
	management:
		endpoints:
			web:
				exposure:
					include: "*"

- 訪問入口
	- http://localhost:8781/hystrix
	- Hystrix Dashboard輸入: http://localhost:8781/actuator/hystrix.stream
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章