Skip to content

Commit c187f03

Browse files
authored
Merge branch 'spring-cloud:main' into main
2 parents 197bbd8 + 66aa480 commit c187f03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/modules/ROOT/pages/spring-cloud-gateway/the-discoveryclient-route-definition-locator.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
You can configure the gateway to create routes based on services registered with a `DiscoveryClient` compatible service registry.
55

6-
To enable this, set `spring.cloud.gateway.discovery.locator.enabled=true` and make sure a `DiscoveryClient` implementation (such as Netflix Eureka, Consul, or Zookeeper) is on the classpath and enabled.
6+
By default, the routes created use the protocol `lb://service-name` (where `service-name` is the String that `DiscoveryClient::getServices` will return) and this means that they are load-balanced. For that reason, you also need to include the `org.springframework.cloud:spring-cloud-starter-loadbalancer` dependency, so that it is available on the classpath.
7+
8+
To enable this, set `spring.cloud.gateway.discovery.locator.enabled=true` and make sure a `DiscoveryClient` implementation (such as Netflix Eureka, Consul, Zookeeper or Kubernetes) is on the classpath and enabled.
79

810
[[configuring-predicates-and-filters-for-discoveryclient-routes]]
911
== Configuring Predicates and Filters For `DiscoveryClient` Routes

0 commit comments

Comments
 (0)