Skip to content

Commit 0e98e1b

Browse files
authored
Order caching after discovery client
Fixes #1630 Signed-off-by: Ryan Baxter <ryan.baxter@broadcom.com>
1 parent c3aa1c1 commit 0e98e1b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/modules/ROOT/pages/spring-cloud-commons/loadbalancer.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public class CustomLoadBalancerConfiguration {
118118
ConfigurableApplicationContext context) {
119119
return ServiceInstanceListSupplier.builder()
120120
.withDiscoveryClient()
121-
.withWeighted()
122121
.withCaching()
122+
.withWeighted()
123123
.build(context);
124124
}
125125
}
@@ -139,8 +139,8 @@ public class CustomLoadBalancerConfiguration {
139139
ConfigurableApplicationContext context) {
140140
return ServiceInstanceListSupplier.builder()
141141
.withDiscoveryClient()
142-
.withWeighted(instance -> ThreadLocalRandom.current().nextInt(1, 101))
143142
.withCaching()
143+
.withWeighted(instance -> ThreadLocalRandom.current().nextInt(1, 101))
144144
.build(context);
145145
}
146146
}
@@ -403,8 +403,8 @@ public class CustomLoadBalancerConfiguration {
403403
ConfigurableApplicationContext context) {
404404
return ServiceInstanceListSupplier.builder()
405405
.withDiscoveryClient()
406-
.withSubset()
407406
.withCaching()
407+
.withSubset()
408408
.build(context);
409409
}
410410
}

0 commit comments

Comments
 (0)