3
votes

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 ?

enter image description here

Here is the code:

@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class SpringHystrixSchoolServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringHystrixSchoolServiceApplication.class, args);
    }
}
1
Do you have @EnableHystrixDashboard on your Application class? - Davin
Are you sure it's not /hystrix-dashboard ? - Luay Abdulraheem
Make sure you have org.springframework.boot:spring-boot-starter-actuator as a dependency and the path is /actuator/hystrix at least with spring boot 2 - Chirdeep Tomar

1 Answers

2
votes

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