diff --git a/pom.xml b/pom.xml index fb34907e..579f639d 100644 --- a/pom.xml +++ b/pom.xml @@ -122,7 +122,6 @@ spring-cloud-gateway-dependencies spring-cloud-gateway-mvc spring-cloud-gateway-webflux - spring-cloud-gateway-core spring-cloud-gateway-server spring-cloud-starter-gateway spring-cloud-gateway-sample diff --git a/spring-cloud-gateway-core/pom.xml b/spring-cloud-gateway-core/pom.xml deleted file mode 100644 index b1c789e4..00000000 --- a/spring-cloud-gateway-core/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - 4.0.0 - - - org.springframework.cloud - spring-cloud-gateway - 3.0.0-SNAPSHOT - .. - - spring-cloud-gateway-core - jar - Spring Cloud Gateway Core - Spring Cloud Gateway Core (deprecated in favor of spring-cloud-gateway-server) - - ${basedir}/.. - - - - - org.springframework.cloud - spring-cloud-gateway-server - - - org.springframework.boot - spring-boot-starter-webflux - test - - - org.springframework.boot - spring-boot-starter-test - test - - - diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfiguration.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfiguration.java deleted file mode 100644 index 5ae699ea..00000000 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfiguration.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2013-2020 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.gateway.core; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.springframework.context.annotation.Configuration; - -@Configuration(proxyBeanMethods = false) -public class ModuleDeprecatedWarningAutoConfiguration { - - private static final Log log = LogFactory - .getLog(ModuleDeprecatedWarningAutoConfiguration.class); - - public ModuleDeprecatedWarningAutoConfiguration() { - if (log.isWarnEnabled()) { - log.warn( - "The spring-cloud-gateway-core module had been deprecated in favor of spring-cloud-gateway-server"); - } - } - -} diff --git a/spring-cloud-gateway-core/src/main/resources/META-INF/spring.factories b/spring-cloud-gateway-core/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 906423ae..00000000 --- a/spring-cloud-gateway-core/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,6 +0,0 @@ -# Auto Configure -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.springframework.cloud.gateway.core.ModuleDeprecatedWarningAutoConfiguration - -org.springframework.boot.env.EnvironmentPostProcessor=\ -org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor \ No newline at end of file diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfigurationTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfigurationTests.java deleted file mode 100644 index 581d8a76..00000000 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/core/ModuleDeprecatedWarningAutoConfigurationTests.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2013-2020 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.gateway.core; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; - -import static org.assertj.core.api.Assertions.assertThat; - -@ExtendWith(OutputCaptureExtension.class) -public class ModuleDeprecatedWarningAutoConfigurationTests { - - @Test - public void warningLogged(CapturedOutput output) { - new ReactiveWebApplicationContextRunner().withUserConfiguration(TestConfig.class) - .run(context -> { - assertThat(context).hasSingleBean( - ModuleDeprecatedWarningAutoConfiguration.class); - assertThat(output).contains( - "spring-cloud-gateway-core module had been deprecated"); - }); - } - - @EnableAutoConfiguration - protected static class TestConfig { - - } - -} diff --git a/spring-cloud-gateway-dependencies/pom.xml b/spring-cloud-gateway-dependencies/pom.xml index 61edd6e8..20997002 100644 --- a/spring-cloud-gateway-dependencies/pom.xml +++ b/spring-cloud-gateway-dependencies/pom.xml @@ -32,11 +32,6 @@ spring-cloud-gateway-mvc ${project.version} - - org.springframework.cloud - spring-cloud-gateway-core - ${project.version} - org.springframework.cloud spring-cloud-gateway-server diff --git a/spring-cloud-gateway-sample/pom.xml b/spring-cloud-gateway-sample/pom.xml index 001b23ce..9947b94d 100644 --- a/spring-cloud-gateway-sample/pom.xml +++ b/spring-cloud-gateway-sample/pom.xml @@ -40,7 +40,7 @@ org.springframework.cloud - spring-cloud-gateway-core + spring-cloud-gateway-server ${project.version} test-jar test diff --git a/spring-cloud-gateway-server/pom.xml b/spring-cloud-gateway-server/pom.xml index 0603230d..7f748cba 100644 --- a/spring-cloud-gateway-server/pom.xml +++ b/spring-cloud-gateway-server/pom.xml @@ -1,20 +1,4 @@ - - @@ -23,7 +7,7 @@ org.springframework.cloud spring-cloud-gateway - 2.2.6.BUILD-SNAPSHOT + 3.0.0-SNAPSHOT .. spring-cloud-gateway-server @@ -58,16 +42,6 @@ spring-boot-configuration-processor true - - org.springframework.cloud - spring-cloud-starter-netflix-ribbon - true - - - org.springframework.cloud - spring-cloud-starter-netflix-hystrix - true - org.springframework.cloud spring-cloud-loadbalancer @@ -112,11 +86,6 @@ spring-cloud-starter-circuitbreaker-reactor-resilience4j true - - org.springframework.cloud - spring-cloud-starter-netflix-eureka-client - test - org.springframework.boot spring-boot-starter-test @@ -127,6 +96,11 @@ junit-vintage-engine test + + org.junit-pioneer + junit-pioneer + test + org.springframework.cloud spring-cloud-test-support @@ -153,8 +127,8 @@ test - com.github.kstyrc - embedded-redis + org.testcontainers + junit-jupiter test @@ -232,7 +206,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.0 + 3.2.0 @@ -244,6 +218,32 @@ + + java13plus + + [13,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + **/*Tests.java + **/*Test.java + + + **/Abstract*.java + + + -XX:+AllowRedefinitionToAddDeleteMethods + + + + + java8plus diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/Buildable.java b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/Buildable.java similarity index 100% rename from spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/Buildable.java rename to spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/Buildable.java diff --git a/spring-cloud-gateway-server/src/main/resources/META-INF/spring.factories b/spring-cloud-gateway-server/src/main/resources/META-INF/spring.factories index 5019e783..989a1afb 100644 --- a/spring-cloud-gateway-server/src/main/resources/META-INF/spring.factories +++ b/spring-cloud-gateway-server/src/main/resources/META-INF/spring.factories @@ -2,9 +2,7 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration,\ org.springframework.cloud.gateway.config.GatewayAutoConfiguration,\ -org.springframework.cloud.gateway.config.GatewayHystrixCircuitBreakerAutoConfiguration,\ org.springframework.cloud.gateway.config.GatewayResilience4JCircuitBreakerAutoConfiguration,\ -org.springframework.cloud.gateway.config.GatewayLoadBalancerClientAutoConfiguration,\ org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration,\ org.springframework.cloud.gateway.config.GatewayMetricsAutoConfiguration,\ org.springframework.cloud.gateway.config.GatewayRedisAutoConfiguration,\