Fix docs after review. Regenerate configprops.
This commit is contained in:
@@ -135,7 +135,7 @@ Please see the documentation of the `ServiceRegistry` implementation you use for
|
||||
For instance, Eureka's supported statuses are `UP`, `DOWN`, `OUT_OF_SERVICE`, and `UNKNOWN`.
|
||||
|
||||
[[rest-template-loadbalancer-client]]
|
||||
== Spring `RestTemplate` as a LoadBalancer Client
|
||||
== Spring RestTemplate as a LoadBalancer Client
|
||||
|
||||
You can configure a `RestTemplate` to use a Load-balancer client.
|
||||
To create a load-balanced `RestTemplate`, create a `RestTemplate` `@Bean` and use the `@LoadBalanced` qualifier, as the following example shows:
|
||||
@@ -173,7 +173,7 @@ IMPORTANT: To use a load-balanced `RestTemplate`, you need to have a Spring Clou
|
||||
Add xref:spring-cloud-commons/loadbalancer.adoc#spring-cloud-loadbalancer-starter[Spring Cloud LoadBalancer starter] to your project in order to use it.
|
||||
|
||||
[[multiple-resttemplate-objects]]
|
||||
=== Multiple `RestTemplate` Objects
|
||||
=== Multiple RestTemplate Objects
|
||||
|
||||
If you want a `RestTemplate` that is not load-balanced, create a `RestTemplate` bean and inject it.
|
||||
To access the load-balanced `RestTemplate`, use the `@LoadBalanced` qualifier when you create your `@Bean`, as the following example shows:
|
||||
@@ -219,7 +219,7 @@ IMPORTANT: Notice the use of the `@Primary` annotation on the plain `RestTemplat
|
||||
TIP: If you see errors such as `java.lang.IllegalArgumentException: Can not set org.springframework.web.client.RestTemplate field com.my.app.Foo.restTemplate to com.sun.proxy.$Proxy89`, try injecting `RestOperations` or setting `spring.aop.proxyTargetClass=true`.
|
||||
|
||||
[[rest-client-loadbalancer-client]]
|
||||
== Spring `RestClient` as a LoadBalancer Client
|
||||
== Spring RestClient as a LoadBalancer Client
|
||||
|
||||
You can configure a `RestClient` to use a Load-balancer client.
|
||||
To create a load-balanced `RestClient`, create a `RestClient.Builder` `@Bean` and use the `@LoadBalanced` qualifier, as the following example shows:
|
||||
@@ -250,8 +250,7 @@ public class MyClass {
|
||||
The URI needs to use a virtual host name (that is, a service name, not a host name).
|
||||
The `BlockingLoadBalancerClient` is used to create a full physical address.
|
||||
|
||||
IMPORTANT: To use a load-balanced `RestClient`, you need to have a Spring LoadBalancer implementation in your classpath.
|
||||
Add xref:spring-cloud-commons/loadbalancer.adoc#spring-cloud-loadbalancer-starter[Spring Cloud LoadBalancer starter] to your project in order to use it.
|
||||
IMPORTANT: To use it, add xref:spring-cloud-commons/loadbalancer.adoc#spring-cloud-loadbalancer-starter[Spring Cloud LoadBalancer starter] to your project.
|
||||
|
||||
[[multiple-restclient-objects]]
|
||||
=== Multiple `RestClient.Builder` Objects
|
||||
@@ -300,7 +299,7 @@ public class MyClass {
|
||||
IMPORTANT: Notice the use of the `@Primary` annotation on the plain `RestTemplate` declaration in the preceding example to disambiguate the unqualified `@Autowired` injection.
|
||||
|
||||
[[webclinet-loadbalancer-client]]
|
||||
== Spring `WebClient` as a LoadBalancer Client
|
||||
== Spring WebClient as a LoadBalancer Client
|
||||
|
||||
You can configure `WebClient` to automatically use a load-balancer client.
|
||||
To create a load-balanced `WebClient`, create a `WebClient.Builder` `@Bean` and use the `@LoadBalanced` qualifier, as follows:
|
||||
|
||||
@@ -44,7 +44,7 @@ NOTE: The classes you pass as `@LoadBalancerClient` or `@LoadBalancerClients` co
|
||||
[[spring-cloud-loadbalancer-integrations]]
|
||||
== Spring Cloud LoadBalancer integrations
|
||||
|
||||
In order to make it easy to use Spring Cloud LoadBalancer, we provide `ReactorLoadBalancerExchangeFilterFunction` that can be used with `WebClient` and `BlockingLoadBalancerClient` that works with `RestTemplate` and `RestClient`.
|
||||
To make it easy to use Spring Cloud LoadBalancer, we provide `ReactorLoadBalancerExchangeFilterFunction` (which can be used with `WebClient`) and `BlockingLoadBalancerClient` (which works with `RestTemplate` and `RestClient`).
|
||||
You can see more information and examples of usage in the following sections:
|
||||
|
||||
* xref:spring-cloud-commons/common-abstractions.adoc#rest-template-loadbalancer-client[Spring `RestTemplate` as a LoadBalancer Client]
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
|spring.cloud.loadbalancer.stats.micrometer.enabled | `+++false+++` | Enables Spring Cloud LoadBalancer Micrometer stats.
|
||||
|spring.cloud.loadbalancer.sticky-session.add-service-instance-cookie | `+++false+++` | Indicates whether a cookie with the newly selected instance should be added by LoadBalancer.
|
||||
|spring.cloud.loadbalancer.sticky-session.instance-id-cookie-name | `+++sc-lb-instance-id+++` | The name of the cookie holding the preferred instance id.
|
||||
|spring.cloud.loadbalancer.subset.instance-id | | Instance id of deterministic subsetting. If not set, {@link IdUtils#getDefaultInstanceId(PropertyResolver)} will be used.
|
||||
|spring.cloud.loadbalancer.subset.size | `+++100+++` | Max subset size of deterministic subsetting.
|
||||
|spring.cloud.loadbalancer.x-forwarded.enabled | `+++false+++` | To Enable X-Forwarded Headers.
|
||||
|spring.cloud.loadbalancer.zone | | Spring Cloud LoadBalancer zone.
|
||||
|spring.cloud.refresh.additional-property-sources-to-retain | | Additional property sources to retain during a refresh. Typically only system property sources are retained. This property allows property sources, such as property sources created by EnvironmentPostProcessors to be retained as well.
|
||||
|
||||
Reference in New Issue
Block a user