From fe269a1f988a73b1641b793a0e961f9a7de42b68 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 9 Sep 2019 15:50:44 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- reference/html/index.html | 28 +++++++++++++----------- reference/html/spring-cloud-commons.html | 28 +++++++++++++----------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/reference/html/index.html b/reference/html/index.html index 2690002e..90898f5b 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -752,7 +752,7 @@ See In order to use a load-balanced RestTemplate, you need to have a load-balancer implementation in your classpath. The recommended implementation is BlockingLoadBalancerClient -- add org.springframework.cloud:spring-cloud-loadbalancer in order to use it. +- add org.springframework.cloud:spring-cloud-starter-loadbalancer in order to use it. The RibbonLoadBalancerClient also can be used, but it’s now under maintenance and we do not recommend adding it to new projects. @@ -766,8 +766,9 @@ The -If you want to use BlockingLoadBalancerClient, make sure you do not have -RibbonLoadBalancerClient in the project classpath, as for backward compatibility reasons, it will be used by default. +If you have both RibbonLoadBalancerClient and BlockingLoadBalancerClient, in order to +preserve backward compatibility, RibbonLoadBalancerClient will be used by default. In order +to override it, you can set the property spring.cloud.loadbalancer.ribbon.enabled to false. @@ -815,27 +816,28 @@ The Ribbon client is used to create a full physical address.

If you want to use a @LoadBalanced WebClient.Builder, you need to have a loadbalancer implementation in the classpath. It is recommended that you add the -org.springframework.cloud:spring-cloud-loadbalancer dependency to your project. +org.springframework.cloud:spring-cloud-starter-loadbalancer dependency to your project. Then, ReactiveLoadBalancer will be used underneath. Alternatively, this functionality will also work with spring-cloud-starter-netflix-ribbon, but the request will be handled by a non-reactive LoadBalancerClient under the hood. Additionally, -spring-cloud-starter-netflix-ribbon is already in maintenance mode, so we do not recommned +spring-cloud-starter-netflix-ribbon is already in maintenance mode, so we do not recommend adding it to new projects. -
+
- + -The ReactorLoadBalancer used underneath supports caching. If cacheManager is detected, -cached version of ServiceInstanceSupplier will be used. If not, we will retrieve instances -from discovery service without caching them. We recommend enabling caching in your project -if you use ReactiveLoadBalancer. +In order to make use of the more efficient cached version of ServiceInstanceSupplier, + spring-cloud-starter-loadbalancer will enable caching by default. +Spring Boot Caching +mechanism will be used under the hood. If you don’t want caching to be used, you can set +the value of spring.cache.type to none.
@@ -994,7 +996,7 @@ If you see errors such as java.lang.IllegalArgumentException: Can not set

Spring WebFlux WebClient with Reactive Load Balancer

WebClient can be configured to use the ReactiveLoadBalancer. -If you add org.springframework.cloud:spring-cloud-loadbalancer to your project, +If you add org.springframework.cloud:spring-cloud-starter-loadbalancer to your project, ReactorLoadBalancerExchangeFilterFunction is auto-configured if spring-webflux is on the classpath. The following example shows how to configure a WebClient to use reactive load balancer under the hood:

@@ -1024,7 +1026,7 @@ The ReactorLoadBalancerClient is used to create a full physical add

Spring WebFlux WebClient with non-reactive Load Balancer Client

-

If you you don’t have org.springframework.cloud:spring-cloud-loadbalancer in your project, +

If you you don’t have org.springframework.cloud:spring-cloud-starter-loadbalancer in your project, but you do have spring-cloud-starter-netflix-ribbon, you can still use WebClient with LoadBalancerClient. LoadBalancerExchangeFilterFunction will be auto-configured if spring-webflux is on the classpath. Please note, however, that this is uses a non-reactive client under the hood. diff --git a/reference/html/spring-cloud-commons.html b/reference/html/spring-cloud-commons.html index 2690002e..90898f5b 100644 --- a/reference/html/spring-cloud-commons.html +++ b/reference/html/spring-cloud-commons.html @@ -752,7 +752,7 @@ See In order to use a load-balanced RestTemplate, you need to have a load-balancer implementation in your classpath. The recommended implementation is BlockingLoadBalancerClient -- add org.springframework.cloud:spring-cloud-loadbalancer in order to use it. +- add org.springframework.cloud:spring-cloud-starter-loadbalancer in order to use it. The RibbonLoadBalancerClient also can be used, but it’s now under maintenance and we do not recommend adding it to new projects. @@ -766,8 +766,9 @@ The -If you want to use BlockingLoadBalancerClient, make sure you do not have -RibbonLoadBalancerClient in the project classpath, as for backward compatibility reasons, it will be used by default. +If you have both RibbonLoadBalancerClient and BlockingLoadBalancerClient, in order to +preserve backward compatibility, RibbonLoadBalancerClient will be used by default. In order +to override it, you can set the property spring.cloud.loadbalancer.ribbon.enabled to false. @@ -815,27 +816,28 @@ The Ribbon client is used to create a full physical address.

If you want to use a @LoadBalanced WebClient.Builder, you need to have a loadbalancer implementation in the classpath. It is recommended that you add the -org.springframework.cloud:spring-cloud-loadbalancer dependency to your project. +org.springframework.cloud:spring-cloud-starter-loadbalancer dependency to your project. Then, ReactiveLoadBalancer will be used underneath. Alternatively, this functionality will also work with spring-cloud-starter-netflix-ribbon, but the request will be handled by a non-reactive LoadBalancerClient under the hood. Additionally, -spring-cloud-starter-netflix-ribbon is already in maintenance mode, so we do not recommned +spring-cloud-starter-netflix-ribbon is already in maintenance mode, so we do not recommend adding it to new projects.
-
+
- + -The ReactorLoadBalancer used underneath supports caching. If cacheManager is detected, -cached version of ServiceInstanceSupplier will be used. If not, we will retrieve instances -from discovery service without caching them. We recommend enabling caching in your project -if you use ReactiveLoadBalancer. +In order to make use of the more efficient cached version of ServiceInstanceSupplier, + spring-cloud-starter-loadbalancer will enable caching by default. +Spring Boot Caching +mechanism will be used under the hood. If you don’t want caching to be used, you can set +the value of spring.cache.type to none.
@@ -994,7 +996,7 @@ If you see errors such as java.lang.IllegalArgumentException: Can not set

Spring WebFlux WebClient with Reactive Load Balancer

WebClient can be configured to use the ReactiveLoadBalancer. -If you add org.springframework.cloud:spring-cloud-loadbalancer to your project, +If you add org.springframework.cloud:spring-cloud-starter-loadbalancer to your project, ReactorLoadBalancerExchangeFilterFunction is auto-configured if spring-webflux is on the classpath. The following example shows how to configure a WebClient to use reactive load balancer under the hood:

@@ -1024,7 +1026,7 @@ The ReactorLoadBalancerClient is used to create a full physical add

Spring WebFlux WebClient with non-reactive Load Balancer Client

-

If you you don’t have org.springframework.cloud:spring-cloud-loadbalancer in your project, +

If you you don’t have org.springframework.cloud:spring-cloud-starter-loadbalancer in your project, but you do have spring-cloud-starter-netflix-ribbon, you can still use WebClient with LoadBalancerClient. LoadBalancerExchangeFilterFunction will be auto-configured if spring-webflux is on the classpath. Please note, however, that this is uses a non-reactive client under the hood.