SpringCloud Greenwich.SR1版本出现以上问题解决方案
1.问题:
在搭建SpringCloud使用HystrixDashboard过程中,访问
http://localhost:8001/hystrix.stream时直接提示如上错误。
2.产生原因:
因为在SpringBoot2.X之后,访问路径是默认不开启的,需要自己映射指定hytrix.stream的请求,所以我们需要手动开启。
3.解决方案:
在对应服务application.yml中添加如下配置,其中inclide后面也可以配置为"*"
或者hystrix.stream
皆可。
management:
endpoints:
web:
exposure:
include: ["health","info","hystrix.stream"]
配置完后,在如上访问路径/hystrix.stream
前添加“/actuator”
,即访问路径变为http://localhost:8001/actuator/hystrix.stream