Class LoadBalancerWebClientHttpServiceGroupConfigurer
java.lang.Object
org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerWebClientHttpServiceGroupConfigurer
- All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.web.reactive.function.client.support.WebClientHttpServiceGroupConfigurer, org.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.reactive.function.client.WebClient.Builder>
public class LoadBalancerWebClientHttpServiceGroupConfigurer
extends Object
implements org.springframework.web.reactive.function.client.support.WebClientHttpServiceGroupConfigurer
Load-balancer-specific
WebClientHttpServiceGroupConfigurer implementation. If
the group baseUrl is null, sets up a baseUrl with LoadBalancer
serviceId -resolved from HTTP Service Client groupName set as
host. If the group baseUrl is null or has lb set as its
scheme, a DeferringLoadBalancerExchangeFilterFunction instance picked from
application context is added to the group's WebClient.Builder if available,
allowing for the requests to be load-balanced.- Since:
- 5.0.0
- Author:
- Olga Maciaszek-Sharma
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.web.service.registry.HttpServiceGroupConfigurer
org.springframework.web.service.registry.HttpServiceGroupConfigurer.ClientCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.GroupCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.InitializingClientCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.ProxyFactoryCallback -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionLoadBalancerWebClientHttpServiceGroupConfigurer(org.springframework.beans.factory.ObjectProvider<DeferringLoadBalancerExchangeFilterFunction<LoadBalancedExchangeFilterFunction>> exchangeFilterFunctionProvider, org.springframework.boot.http.client.autoconfigure.service.HttpServiceClientProperties httpServiceClientProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.reactive.function.client.WebClient.Builder> groups) intgetOrder()
-
Constructor Details
-
LoadBalancerWebClientHttpServiceGroupConfigurer
public LoadBalancerWebClientHttpServiceGroupConfigurer(org.springframework.beans.factory.ObjectProvider<DeferringLoadBalancerExchangeFilterFunction<LoadBalancedExchangeFilterFunction>> exchangeFilterFunctionProvider, org.springframework.boot.http.client.autoconfigure.service.HttpServiceClientProperties httpServiceClientProperties)
-
-
Method Details
-
configureGroups
public void configureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.reactive.function.client.WebClient.Builder> groups) - Specified by:
configureGroupsin interfaceorg.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.reactive.function.client.WebClient.Builder>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.reactive.function.client.WebClient.Builder>- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-