You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-commons/common-abstractions.adoc
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,6 +250,22 @@ public class MyClass {
250
250
The URI needs to use a virtual host name (that is, a service name, not a host name).
251
251
The `BlockingLoadBalancerClient` is used to create a full physical address.
252
252
253
+
In order to leverage additional capabilities that Spring Boot provides for `RestClient.Builder` (for example, observability support) you may want to use the autoconfigured
254
+
`RestClientBuilderConfigurer` while creating the `@LoadBalanced RestClient.Builder` beans:
IMPORTANT: To use it, add xref:spring-cloud-commons/loadbalancer.adoc#spring-cloud-loadbalancer-starter[Spring Cloud LoadBalancer starter] to your project.
254
270
255
271
[[multiple-restclient-objects]]
@@ -330,6 +346,24 @@ public class MyClass {
330
346
The URI needs to use a virtual host name (that is, a service name, not a host name).
331
347
The Spring Cloud LoadBalancer is used to create a full physical address.
332
348
349
+
In order to leverage additional capabilities that Spring Boot provides for `WebClient.Builder` (for example, observability support) you may want to use the autoconfigured
350
+
`WebClientCustomizer` beans while creating the `@LoadBalanced WebClient.Builder` beans:
351
+
352
+
[source,java,indent=0]
353
+
----
354
+
@Configuration
355
+
public class MyConfiguration {
356
+
357
+
@Bean
358
+
@LoadBalanced
359
+
public WebClient.Builder loadBalancedWebClientBuilder(ObjectProvider<WebClientCustomizer> customizerProvider) {
0 commit comments