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 ebb752cb..ded6bc62 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 @@ -53,6 +53,8 @@ public class ReactorLoadBalancerClientAutoConfiguration { @Bean @ConditionalOnClass( name = "org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient") + @ConditionalOnProperty(value = "spring.cloud.loadbalancer.ribbon.enabled", + matchIfMissing = true) public ReactorLoadBalancerClientRibbonWarnLogger reactorLoadBalancerClientRibbonWarnLogger() { return new ReactorLoadBalancerClientRibbonWarnLogger(); } diff --git a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/config/BlockingLoadBalancerClientAutoConfiguration.java b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/config/BlockingLoadBalancerClientAutoConfiguration.java index e677eabf..15911890 100644 --- a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/config/BlockingLoadBalancerClientAutoConfiguration.java +++ b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/config/BlockingLoadBalancerClientAutoConfiguration.java @@ -42,7 +42,7 @@ import org.springframework.web.client.RestTemplate; * An autoconfiguration for {@link BlockingLoadBalancerClient}. * * @author Olga Maciaszek-Sharma - * @since 2.2.0 + * @since 2.1.3 */ @Configuration @LoadBalancerClients @@ -55,6 +55,8 @@ public class BlockingLoadBalancerClientAutoConfiguration { @Bean @ConditionalOnClass( name = "org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient") + @ConditionalOnProperty(value = "spring.cloud.loadbalancer.ribbon.enabled", + matchIfMissing = true) public BlockingLoadBalancerClientRibbonWarnLogger blockingLoadBalancerClientRibbonWarnLogger() { return new BlockingLoadBalancerClientRibbonWarnLogger(); }