I have created a microservice with following dependencies of Spring cloud version Camden.SR2
. Spring Boot 1.4.1. http://localhost:8080/hystrix.stream
is not responding.
If I make the Spring Cloud version as Brixton.*
(RELEASE, SR1,...), I get only ping:
as reply in browser.
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
application.properties
spring.application.name=sample-service
server.port = 8080
Application
@SpringBootApplication
@EnableCircuitBreaker
public class SampleApplication {
public static void main(String[] args) {
SpringApplication.run(SampleApplication.class, args);
}
}
First, we need to add the Spring Cloud Starter Hystrix dependency in our build configuration file. Now, add the @EnableHystrix annotation into your main Spring Boot application class file. The @EnableHystrix annotation is used to enable the Hystrix functionalities into your Spring Boot application.
In SpringOne 2019, Spring announced that Hystrix Dashboard will be removed from Spring Cloud 3.1 version which makes it officially dead. As the Circuit Breaker pattern has been advertised so heavily, many developers have either used it or want to use it, and now need a replacement.
For those who are using spring boot 2 (I am using 2.0.2.RELEASE)
, the hystrix.stream
endpoint has been moved to /actuator/hystrix.stream
.
For me this url worked:
http://localhost:8082/actuator/hystrix.stream
And yes, have this actuator endpoint enabled via following property:
management.endpoints.web.exposure.include=hystrix.stream
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With