Removes references to Ribbon

This commit is contained in:
spencergibb
2021-04-19 19:47:08 -04:00
parent c42221a28f
commit aed60fc611
7 changed files with 7 additions and 76 deletions

View File

@@ -13,8 +13,8 @@ and binding to the Spring Environment and other Spring programming model idioms.
simple annotations you can quickly enable and configure the common patterns inside your
application and build large distributed systems with Consul based components. The
patterns provided include Service Discovery, Control Bus and Configuration.
Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon), Circuit Breaker
(Hystrix) are provided by integration with Spring Cloud Netflix.
Intelligent Routing and Client Side Load Balancing, Circuit Breaker
are provided by integration with other Spring Cloud projects.
== Quick Start
@@ -263,7 +263,7 @@ See the https://consul.io/intro/index.html[intro] for more information.
== Spring Cloud Consul Features
* Spring Cloud `DiscoveryClient` implementation
** supports Ribbon and Zuul
** supports Spring Cloud Gateway
** supports Spring Cloud LoadBalancer
* Consul based `PropertySource` loaded during the 'bootstrap' phase.
* Spring Cloud Bus implementation based on Consul https://www.consul.io/docs/agent/http/event.html[events]

View File

@@ -23,7 +23,7 @@ See the https://consul.io/intro/index.html[intro] for more information.
== Spring Cloud Consul Features
* Spring Cloud `DiscoveryClient` implementation
** supports Ribbon and Zuul
** supports Spring Cloud Gateway
** supports Spring Cloud LoadBalancer
* Consul based `PropertySource` loaded during the 'bootstrap' phase.
* Spring Cloud Bus implementation based on Consul https://www.consul.io/docs/agent/http/event.html[events]

View File

@@ -3,6 +3,6 @@ and binding to the Spring Environment and other Spring programming model idioms.
simple annotations you can quickly enable and configure the common patterns inside your
application and build large distributed systems with Consul based components. The
patterns provided include Service Discovery, Control Bus and Configuration.
Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon), Circuit Breaker
(Hystrix) are provided by integration with Spring Cloud Netflix.
Intelligent Routing and Client Side Load Balancing, Circuit Breaker
are provided by integration with other Spring Cloud projects.

View File

@@ -5,9 +5,8 @@ Spring Cloud Consul provides http://consul.io[Consul] integrations for Spring Bo
Spring Cloud Consul features:
* Service Discovery: instances can be registered with the Consul agent and clients can discover the instances using Spring-managed beans
* Supports Ribbon, the client side load-balancer via Spring Cloud Netflix
* Supports Spring Cloud LoadBalancer - a client side load-balancer provided by the Spring Cloud project
* Supports Zuul, a dynamic router and filter via Spring Cloud Netflix
* Supports Spring Cloud Gateway, a dynamic router and filter
* Distributed Configuration: using the Consul Key/Value store
* Control Bus: Distributed control events using Consul Events

View File

@@ -1,11 +1,5 @@
{
"properties": [
{
"name": "spring.cloud.consul.ribbon.enabled",
"type": "java.lang.Boolean",
"description": "Enables Consul and Ribbon integration.",
"defaultValue": "true"
},
{
"name": "spring.cloud.service-registry.enabled",
"type": "java.lang.Boolean",

View File

@@ -1,59 +0,0 @@
/*
* Copyright 2013-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.consul.discovery;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link RibbonConsulAutoConfiguration}.
*
* @author Flora Kalisa
*/
public class RibbonConsulAutoConfigurationTests {
ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(RibbonAutoConfiguration.class,
RibbonConsulAutoConfiguration.class));
@Test
public void shouldWorkWithDefaults() {
contextRunner.run(context -> assertThat(context)
.hasSingleBean(RibbonConsulAutoConfiguration.class));
}
@Test
public void shouldNotHaveRibbonConsulAutoConfigWhenConsulRibbonDisabled() {
contextRunner.withPropertyValues("spring.cloud.consul.ribbon.enabled=false")
.run(context -> assertThat(context)
.doesNotHaveBean(RibbonConsulAutoConfiguration.class));
}
@Test
public void shouldNotHaveRibbonConsulAutoConfigWhenConsulDiscoveryDisabled() {
contextRunner.withPropertyValues("spring.cloud.consul.discovery.enabled=false")
.run(context -> assertThat(context)
.doesNotHaveBean(RibbonConsulAutoConfiguration.class));
}
}

View File

@@ -1,9 +1,6 @@
server:
port: 8080
ribbon:
ServerListRefreshInterval: 1000
endpoints:
health:
sensitive: false