环境:idea2018.01、SpringBoot2.2.0.RELEASE、SpringCloud Hoxton.RC1、Hystrix1.4.7.RELEASE
pom.xml加入:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
<version>1.4.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
<version>1.4.7.RELEASE</version>
</dependency>
控制台出现:
有些教程中链接为 http://localhost:port/hystrix.stream。这里需要注意一下。
访问 http://localhost:9090/hystrix 进入图形化界面,输入http://localhost:9090/actuator/hystrix.stream,会看到 Unable to connect to Command Metric Stream
需要配置application.properties:
management.endpoints.web.exposure.include= *
重新进入。