To apply more effective resilience to endpoint executions, Spring Cloud Netflix Ribbon is sometimes paired with Spring Cloud Netflix Hystrix, which is built through the circuit breaker design pattern whose objective is to rescue client applications from shutting down due to faulty ResponseEntity
or undefined Mono<T>
and Flux<T>
responses.
Create a typical Spring Boot 2.0 project named as ch10-hystrix
that will focus on the independent configuration and setup of Hystrix
.
Implement recovery transactions by following these steps:
- Create a new Maven project
ch10-hystrix
and add the core starter POM dependencies of Spring Boot 2.0 such as thewebflux
, embedded Tomcat server and theactuator
. To importHystrix
modules, add first the Spring Cloud Finchley dependency plugin topom.xml
. - Then, add the Spring Cloud Netflix Hystrix dependencies to
pom.xml
:
<dependency> <groupId>org.springframework.cloud...