Spring Cloud - hystrix-dashboard is not working?

2019-06-05 05:29发布

问题:

Spring Cloud Hystrix Circuit Breaker Pattern Example. I have added below dependency in the code taking https://howtodoinjava.com/spring/spring-cloud/spring-hystrix-circuit-breaker-tutorial/ Spring Boot Starter parent version is 1.5.13.BUILD-SNAPSHOT

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>

When I launch http://localhost:9098/hystrix, nothing is coming.

Could you please guide how to fixed it ?

Here is the code:

@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class SpringHystrixSchoolServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringHystrixSchoolServiceApplication.class, args);
    }
}

回答1:

Since you are using spring boot 1.3,you need to use http://localhost:9098/hystrix.html

From Spring boot 2.x hystrix URL move to http://localhost:9098/hystrix