Open trajano opened 3 years ago
It appears the documentation needs to be updated to say
The Gateway can be configured to create routes based on services registered with a ReactiveDiscoveryClient
compatible service registry. I updated my MVCE to have Reactive and I see it being accessed.
To enable this, set spring.cloud.gateway.discovery.locator.enabled=true and make sure a ReactiveDiscoveryClient
implementation is on the classpath and enabled (such as Netflix Eureka, Consul or Zookeeper).
You can verify it to work by going to http://localhost:8080/actuator/gateway/routes
Describe the bug Per https://cloud.spring.io/spring-cloud-gateway/multi/multi__configuration.html#_discoveryclient_route_definition_locator
In my mvce I wrote a simple discovery client and verified that it does get created using
@PostConstruct
. However thegetInstances()
andgetServices()
do not appear to be called. They return empty sets but there's aSystem.out
to indicate that they are executed but I don't see it in the console logs.Sample If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.