spring cloud hystrix dashboard访问 actuator hystrix stream出现whitelabel error page的解决方法

  • A+
所属分类:全文检索

---
title: Spring Cloud Hystrix Dashboard访问/actuator/hystrix.stream出现Whitelabel Error Page的解决方法
date: 2019-04-11 16:32:20
categories: SpringCloud
tags:
- spring
- SpringBoot
- 版本
- Cloud
- Hystrix
- Dashboard
- actuator
- stream
- Whitelabel
- EnableHystrixDashboard
- spring-boot-starter-actuator
- HystrixCommand
- management
- endpoints
- exposure
---

首先,Spring Cloud Hystrix Dashboard的首页是可以访问的,客户端的接口是http://localhost:5667/hello,现在访问http://localhost:5667/actuator/hystrix.stream会出现Whitelabel Error Page

感觉是哪里没有配置好,但是完全是按照视频教程里来的呀。百度了一下,发现是跟SpringBoot的版本有关。我用的是2.1.4版本。

现有的配置是:

  • Hystrix Dashboard的配置是启动类上加了@EnableHystrixDashboard
  • 客户端的pom里加了spring-boot-starter-actuator的依赖,hello方法上加了@HystrixCommand注解。

研究后,最终的解决方法是在客户端的application.properties里加上management.endpoints.web.exposure.include=hystrix.stream再启动即可。

ZPY

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: