mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Remove Spring Cloud Connectors auto-config/starter
The Spring Cloud Connectors project has been deprecated in favor of the Java CFEnv project. The Boot auto-configuration and starter that support Connectors were deprecated in Boot 2.2. This commit removes the Connectors auto-configuration, starter, and dependency management. Closes gh-19798
This commit is contained in:
parent
df5b0f1163
commit
ed6fbc6bec
@ -140,7 +140,6 @@ dependencies {
|
|||||||
optional 'org.springframework.session:spring-session-jdbc'
|
optional 'org.springframework.session:spring-session-jdbc'
|
||||||
optional 'org.springframework.amqp:spring-rabbit'
|
optional 'org.springframework.amqp:spring-rabbit'
|
||||||
optional 'org.springframework.kafka:spring-kafka'
|
optional 'org.springframework.kafka:spring-kafka'
|
||||||
optional 'org.springframework.cloud:spring-cloud-spring-service-connector'
|
|
||||||
optional 'org.springframework.ws:spring-ws-core'
|
optional 'org.springframework.ws:spring-ws-core'
|
||||||
optional 'org.thymeleaf:thymeleaf'
|
optional 'org.thymeleaf:thymeleaf'
|
||||||
optional 'org.thymeleaf:thymeleaf-spring5'
|
optional 'org.thymeleaf:thymeleaf-spring5'
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012-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.boot.autoconfigure.cloud;
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
|
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
||||||
import org.springframework.cloud.Cloud;
|
|
||||||
import org.springframework.cloud.app.ApplicationInstanceInfo;
|
|
||||||
import org.springframework.cloud.config.java.CloudScan;
|
|
||||||
import org.springframework.cloud.config.java.CloudScanConfiguration;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.context.annotation.Import;
|
|
||||||
import org.springframework.context.annotation.Profile;
|
|
||||||
import org.springframework.core.Ordered;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@link EnableAutoConfiguration Auto-configuration} for Spring Cloud Service Connectors.
|
|
||||||
* <p>
|
|
||||||
* Activates when there is no bean of type {@link Cloud} and the "cloud" profile is
|
|
||||||
* active.
|
|
||||||
* <p>
|
|
||||||
* Once in effect, the auto-configuration is the equivalent of adding the
|
|
||||||
* {@link CloudScan @CloudScan} annotation in one of the configuration file. Specifically,
|
|
||||||
* it adds a bean for each service bound to the application and one for
|
|
||||||
* {@link ApplicationInstanceInfo}.
|
|
||||||
*
|
|
||||||
* @author Ramnivas Laddad
|
|
||||||
* @since 2.1.0
|
|
||||||
*/
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
|
||||||
@Profile("cloud")
|
|
||||||
@AutoConfigureOrder(CloudServiceConnectorsAutoConfiguration.ORDER)
|
|
||||||
@ConditionalOnClass(CloudScanConfiguration.class)
|
|
||||||
@ConditionalOnMissingBean(Cloud.class)
|
|
||||||
@Import(CloudScanConfiguration.class)
|
|
||||||
public class CloudServiceConnectorsAutoConfiguration {
|
|
||||||
|
|
||||||
// Cloud configuration needs to happen early (before data, mongo etc.)
|
|
||||||
public static final int ORDER = Ordered.HIGHEST_PRECEDENCE + 20;
|
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(CloudServiceConnectorsAutoConfiguration.class);
|
|
||||||
|
|
||||||
public CloudServiceConnectorsAutoConfiguration() {
|
|
||||||
logger.warn("Support for Spring Cloud Connectors has been deprecated in favor of Java CFEnv");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012-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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Auto-configuration for Spring Cloud Service Connectors.
|
|
||||||
*/
|
|
||||||
package org.springframework.boot.autoconfigure.cloud;
|
|
@ -25,7 +25,6 @@ org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,\
|
|||||||
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\
|
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
|
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\
|
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.cloud.CloudServiceConnectorsAutoConfiguration,\
|
|
||||||
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\
|
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\
|
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\
|
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012-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.boot.autoconfigure.cloud;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationSorter;
|
|
||||||
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
|
||||||
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests for {@link CloudServiceConnectorsAutoConfiguration}.
|
|
||||||
*
|
|
||||||
* @author Phillip Webb
|
|
||||||
*/
|
|
||||||
class CloudServiceConnectorsAutoConfigurationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testOrder() {
|
|
||||||
TestAutoConfigurationSorter sorter = new TestAutoConfigurationSorter(new CachingMetadataReaderFactory());
|
|
||||||
Collection<String> classNames = new ArrayList<>();
|
|
||||||
classNames.add(MongoAutoConfiguration.class.getName());
|
|
||||||
classNames.add(DataSourceAutoConfiguration.class.getName());
|
|
||||||
classNames.add(MongoRepositoriesAutoConfiguration.class.getName());
|
|
||||||
classNames.add(JpaRepositoriesAutoConfiguration.class.getName());
|
|
||||||
classNames.add(CloudServiceConnectorsAutoConfiguration.class.getName());
|
|
||||||
List<String> ordered = sorter.getInPriorityOrder(classNames);
|
|
||||||
assertThat(ordered.get(0)).isEqualTo(CloudServiceConnectorsAutoConfiguration.class.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1437,7 +1437,6 @@ bom {
|
|||||||
'spring-boot-starter-artemis',
|
'spring-boot-starter-artemis',
|
||||||
'spring-boot-starter-batch',
|
'spring-boot-starter-batch',
|
||||||
'spring-boot-starter-cache',
|
'spring-boot-starter-cache',
|
||||||
'spring-boot-starter-cloud-connectors',
|
|
||||||
'spring-boot-starter-data-cassandra',
|
'spring-boot-starter-data-cassandra',
|
||||||
'spring-boot-starter-data-cassandra-reactive',
|
'spring-boot-starter-data-cassandra-reactive',
|
||||||
'spring-boot-starter-data-couchbase',
|
'spring-boot-starter-data-couchbase',
|
||||||
@ -1600,17 +1599,6 @@ bom {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
library('Spring Cloud Connectors', '2.0.7.RELEASE') {
|
|
||||||
group('org.springframework.cloud') {
|
|
||||||
modules = [
|
|
||||||
'spring-cloud-cloudfoundry-connector',
|
|
||||||
'spring-cloud-connectors-core',
|
|
||||||
'spring-cloud-heroku-connector',
|
|
||||||
'spring-cloud-localconfig-connector',
|
|
||||||
'spring-cloud-spring-service-connector'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
library('Spring Data Releasetrain', 'Neumann-M2') {
|
library('Spring Data Releasetrain', 'Neumann-M2') {
|
||||||
group('org.springframework.data') {
|
group('org.springframework.data') {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'org.springframework.boot.starter'
|
|
||||||
}
|
|
||||||
|
|
||||||
description = "Starter for using Spring Cloud Connectors which simplifies connecting to services in cloud platforms like Cloud Foundry and Heroku"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api platform(project(':spring-boot-project:spring-boot-dependencies'))
|
|
||||||
api project(':spring-boot-project:spring-boot-starters:spring-boot-starter')
|
|
||||||
api 'org.springframework.cloud:spring-cloud-spring-service-connector'
|
|
||||||
api 'org.springframework.cloud:spring-cloud-cloudfoundry-connector'
|
|
||||||
api 'org.springframework.cloud:spring-cloud-heroku-connector'
|
|
||||||
api 'org.springframework.cloud:spring-cloud-localconfig-connector'
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user