记录一次SpringCloud使用Hystrix-dashboard的失误

记录一次SpringCloud使用Hystrix失误:

为什么说是失误呢,因为在SpringCloud项目中的确没有报错。
我在根据B战某个SpringCloud视频来实施自己创建SpringCloud项目,在使用Hystrix - dashboard豪猪监控时,出现以下问题:
1.火狐浏览器访问http://localhost:8001/actuator/hystrix.stream会出现下载框(换个谷歌浏览器就行了)
2.访问http://localhost:9001/hystrix监控路径进去之后,一直就在loading状态。
为此我也是一脸懵,明明跟着老师视频来做的,我咋就不行呢,原因是:
我们在消费者导入的依赖
记录一次SpringCloud使用Hystrix-dashboard的失误
spring-cloud-starter-netflix-hystrix和spring-cloud-starter-netflix-hystrix-dashboard依赖需要和feign一起使用,单独做一个demo使用是不行的,所以我在pom文件中添加关于feign的依赖

消费者:
启动类:记录一次SpringCloud使用Hystrix-dashboard的失误
controller层:
记录一次SpringCloud使用Hystrix-dashboard的失误
服务提供者:
启动类:
记录一次SpringCloud使用Hystrix-dashboard的失误

controller层:
记录一次SpringCloud使用Hystrix-dashboard的失误
部署好之后,我们依此启动:注册中心7001、服务提供者8001、消费者9001
访问注册中心
记录一次SpringCloud使用Hystrix-dashboard的失误

访问http://localhost:8001/actuator/hystrix.stream
记录一次SpringCloud使用Hystrix-dashboard的失误
再访问:localhost:9001/hystrix
记录一次SpringCloud使用Hystrix-dashboard的失误
填写好对 http://localhost:8001/actuator/hystrix.stream 的监控路径,title 随便起名:
记录一次SpringCloud使用Hystrix-dashboard的失误
然后用消费路径不停的访问:
记录一次SpringCloud使用Hystrix-dashboard的失误
会出现监控信息:
记录一次SpringCloud使用Hystrix-dashboard的失误
到此 hystrix-dashboard 豪猪监控 demo 已经能实现了。