Created
May 29, 2021 14:02
-
-
Save sterlp/3a2c04dcfac7bf99cf79e79e3bbc818c to your computer and use it in GitHub Desktop.
Add Netflix Hystrix and hystrix.stream endpoint to Spring Boot 2.4.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class HystrixConfig { | |
@Bean | |
public ServletRegistrationBean<HystrixMetricsStreamServlet> hystrixStreamServlet(){ | |
return new ServletRegistrationBean<>(new HystrixMetricsStreamServlet(), "/hystrix.stream"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<hystrix.version>1.5.18</hystrix.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>com.netflix.hystrix</groupId> | |
<artifactId>hystrix-request-servlet</artifactId> | |
<version>${hystrix.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>com.netflix.hystrix</groupId> | |
<artifactId>hystrix-metrics-event-stream</artifactId> | |
<version>${hystrix.version}</version> | |
</dependency> | |
<!-- support for rx result types in spring boot --> | |
<dependency> | |
<groupId>io.reactivex</groupId> | |
<artifactId>rxjava-reactive-streams</artifactId> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment