From 7716c939b71c686224fd14e674ccdf8d18d5637c Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Mon, 10 Feb 2020 13:19:13 +0100 Subject: [PATCH] Allow overriding ReactorLoadBalancerExchangeFilterFunction. --- .../reactive/ReactorLoadBalancerClientAutoConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerClientAutoConfiguration.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerClientAutoConfiguration.java index 4c1930e9..8ac96f2d 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerClientAutoConfiguration.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerClientAutoConfiguration.java @@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.context.annotation.Bean; @@ -56,6 +57,7 @@ public class ReactorLoadBalancerClientAutoConfiguration { @Conditional(OnNoRibbonDefaultCondition.class) protected static class ReactorLoadBalancerExchangeFilterFunctionConfig { + @ConditionalOnMissingBean @Bean public ReactorLoadBalancerExchangeFilterFunction loadBalancerExchangeFilterFunction( ReactiveLoadBalancer.Factory loadBalancerFactory) {