RestTemplate, create a ![]() | Caution |
|---|---|
A |
The URI needs to use a virtual host name (that is, a service name, not a host name).
The Ribbon client is used to create a full physical address.
-See RibbonAutoConfiguration for details of how the RestTemplate is set up.
WebClient can be automatically configured to use the LoadBalancerClient.
+See RibbonAutoConfiguration for details of how the RestTemplate is set up.
WebClient can be automatically configured to use the LoadBalancerClient.
To create a load-balanced WebClient, create a WebClient.Builder @Bean and use the @LoadBalanced qualifier, as shown in the following example:
@Configuration public class MyConfiguration { diff --git a/2.1.x/single/spring-cloud-commons.html b/2.1.x/single/spring-cloud-commons.html index 5792f8cf..da252c9c 100644 --- a/2.1.x/single/spring-cloud-commons.html +++ b/2.1.x/single/spring-cloud-commons.html @@ -166,7 +166,7 @@ To create a load-balancedRestTemplate, create a
Caution A
RestTemplatebean is no longer created through auto-configuration. Individual applications must create it.The URI needs to use a virtual host name (that is, a service name, not a host name). The Ribbon client is used to create a full physical address. -See RibbonAutoConfiguration for details of how the
RestTemplateis set up.
WebClient can be automatically configured to use the LoadBalancerClient.
+See RibbonAutoConfiguration for details of how the RestTemplate is set up.
WebClient can be automatically configured to use the LoadBalancerClient.
To create a load-balanced WebClient, create a WebClient.Builder @Bean and use the @LoadBalanced qualifier, as shown in the following example:
@Configuration public class MyConfiguration { diff --git a/2.1.x/spring-cloud-commons.xml b/2.1.x/spring-cloud-commons.xml index 2d0de539..d151a591 100644 --- a/2.1.x/spring-cloud-commons.xml +++ b/2.1.x/spring-cloud-commons.xml @@ -390,7 +390,7 @@ Individual applications must create it.The URI needs to use a virtual host name (that is, a service name, not a host name). The Ribbon client is used to create a full physical address. -See RibbonAutoConfiguration for details of how the +See RibbonAutoConfiguration for details of how theRestTemplate is set up.RestTemplate is set up.Spring WebClient as a Load Balancer Client