In a tutorial from youtube the author to use Spring Cloud Gateway, Hystrix, Netflix, and configure routes with application.yml, but when I try to send data from the endpoint I just hang on the Hystrix Dashboard "Loading ...", in the tutorial works well...
hystrix.stream work well, put him in Histrix dashboard and only show "loading"
I tried another tutorial, but the problem persists again!
Maven Dependencies
spring-cloud-starter-netflix-eureka-client
spring-cloud-starter-config
lombok
spring-boot-starter-data-jpa
spring-boot-starter-web
spring-cloud-starter-hystrix:2.7.3.RELEASE
<spring-cloud.version>Hoxton.SR10</spring-cloud.version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
application.yml
spring:
application:
name: API-GATEWAY
cloud:
gateway:
routes:
- id: USER-SERVICE
uri: lb://USER-SERVICE
predicates:
- Path=/user/**
filters:
- name: CircuitBreaker
args:
name: USER-SERVICE
fallbackuri: forward:/userServiceFallBack
- id: DEPARTMENT-SERVICE
uri: lb://DEPARTMENT-SERVICE
predicates:
- Path=/department/**
filters:
- name: CircuitBreaker
args:
name: DEPARTMENT-SERVICE
fallbackuri: forward:/departmentServiceFallBack
@Bean
@LoadBalanced
public RestTemplate restTemplate(){
return new RestTemplate();
}
If use @EnableCircuitBreaker working very well , the problem is use application.yml to configure spring cloud routes?