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
@@ -333,6 +333,22 @@ public class MyClass {
333
333
The URI needs to use a virtual host name (that is, a service name, not a host name).
334
334
The `BlockingLoadBalancerClient` is used to create a full physical address.
335
335
336
+
In order to leverage additional capabilities that Spring Boot provides for `RestClient.Builder` (for example, observability support) you may want to use the autoconfigured
337
+
`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.
337
353
338
354
[[multiple-restclient-objects]]
@@ -413,6 +429,24 @@ public class MyClass {
413
429
The URI needs to use a virtual host name (that is, a service name, not a host name).
414
430
The Spring Cloud LoadBalancer is used to create a full physical address.
415
431
432
+
In order to leverage additional capabilities that Spring Boot provides for `WebClient.Builder` (for example, observability support) you may want to use the autoconfigured
433
+
`WebClientCustomizer` beans while creating the `@LoadBalanced WebClient.Builder` beans:
434
+
435
+
[source,java,indent=0]
436
+
----
437
+
@Configuration
438
+
public class MyConfiguration {
439
+
440
+
@Bean
441
+
@LoadBalanced
442
+
public WebClient.Builder loadBalancedWebClientBuilder(ObjectProvider<WebClientCustomizer> customizerProvider) {
0 commit comments