Skip to content

Commit

Permalink
Upgrade to Spring Cloud 2023.0.2
Browse files Browse the repository at this point in the history
Closes gh-1495
  • Loading branch information
mhalbritter committed Jun 3, 2024
1 parent 198a828 commit 93748c3
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 42 deletions.
20 changes: 10 additions & 10 deletions start-site/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ initializr:
versionProperty: spring-cloud.version
order: 50
mappings:
- compatibilityRange: "[3.2.0,3.3.0-M1)"
version: 2023.0.1
- compatibilityRange: "[3.2.0,3.4.0-M1)"
version: 2023.0.2
spring-cloud-azure:
groupId: com.azure.spring
artifactId: spring-cloud-azure-dependencies
Expand Down Expand Up @@ -1043,7 +1043,7 @@ initializr:
href: https://java.testcontainers.org/
- name: Contract Verifier
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
id: cloud-contract-verifier
description: Moves TDD to the level of software architecture by enabling Consumer Driven Contract (CDC) development.
groupId: org.springframework.cloud
Expand All @@ -1054,7 +1054,7 @@ initializr:
href: https://cloud.spring.io/spring-cloud-contract/reference/htmlsingle/
- name: Contract Stub Runner
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
id: cloud-contract-stub-runner
description: Stub Runner for HTTP/Messaging based communication. Allows creating WireMock stubs from RestDocs tests.
groupId: org.springframework.cloud
Expand All @@ -1075,7 +1075,7 @@ initializr:
href: https://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/index.html#data.nosql.ldap.embedded
- name: Spring Cloud
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Cloud Bootstrap
id: cloud-starter
Expand Down Expand Up @@ -1107,7 +1107,7 @@ initializr:
href: https://docs.spring.io/spring-cloud-task/docs/current/reference/html/
- name: Spring Cloud Config
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Config Client
id: cloud-config-client
Expand Down Expand Up @@ -1158,7 +1158,7 @@ initializr:
description: Spring Cloud Consul Quick Start
- name: Spring Cloud Discovery
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Eureka Discovery Client
id: cloud-eureka
Expand Down Expand Up @@ -1200,7 +1200,7 @@ initializr:
href: https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/#spring-cloud-consul-discovery
- name: Spring Cloud Routing
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Gateway
id: cloud-gateway
Expand Down Expand Up @@ -1247,7 +1247,7 @@ initializr:
href: https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#spring-cloud-loadbalancer
- name: Spring Cloud Circuit Breaker
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Resilience4J
id: cloud-resilience4j
Expand All @@ -1259,7 +1259,7 @@ initializr:
href: https://docs.spring.io/spring-cloud-circuitbreaker/docs/current/reference/html/#configuring-resilience4j-circuit-breakers
- name: Spring Cloud Messaging
bom: spring-cloud
compatibilityRange: "[3.2.0,3.3.0-M1)"
compatibilityRange: "[3.2.0,3.4.0-M1)"
content:
- name: Cloud Bus
id: cloud-bus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
*/
class SpringCloudCircuitBreakerBuildCustomizerTests extends AbstractExtensionTests {

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.3.0";

private static final Dependency REACTIVE_CLOUD_CIRCUIT_BREAKER = Dependency.withId("cloud-resilience4j-reactive",
"org.springframework.cloud", "spring-cloud-starter-circuitbreaker-reactor-resilience4j");

@Test
void replacesCircuitBreakerWithReactiveCircuitBreakerWhenReactiveFacetPresent() {
ProjectRequest request = createProjectRequest("webflux", "cloud-resilience4j");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("webflux"))
.hasDependency(REACTIVE_CLOUD_CIRCUIT_BREAKER)
.doesNotHaveDependency("org.springframework.cloud", "spring-cloud-starter-circuitbreaker-resilience4j")
Expand All @@ -49,7 +49,7 @@ void replacesCircuitBreakerWithReactiveCircuitBreakerWhenReactiveFacetPresent()
@Test
void doesNotReplaceCircuitBreakerWithReactiveCircuitBreakerWhenReactiveFacetNotPresent() {
ProjectRequest request = createProjectRequest("cloud-resilience4j");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-resilience4j"))
.doesNotHaveDependency("org.springframework.cloud",
"spring-cloud-starter-circuitbreaker-reactor-resilience4j")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
*/
class SpringCloudContractConfigurationTests extends AbstractExtensionTests {

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.3.0";

@Test
void contractsDirectoryWithMavenIsCreatedWithSpringCloudContractVerifier() {
ProjectRequest request = createProjectRequest("web", "cloud-contract-verifier");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("maven-project");
ProjectStructure structure = generateProject(request);
assertThat(structure.getProjectDirectory().resolve("src/test/resources/contracts")).exists().isDirectory();
Expand All @@ -45,7 +45,7 @@ void contractsDirectoryWithMavenIsCreatedWithSpringCloudContractVerifier() {
@Test
void contractsDirectoryWithMavenIsNotCreatedIfSpringCloudContractVerifierIsNotRequested() {
ProjectRequest request = createProjectRequest("web");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("maven-project");
ProjectStructure structure = generateProject(request);
assertThat(structure.getProjectDirectory().resolve("src/test/resources/contracts")).doesNotExist();
Expand All @@ -54,7 +54,7 @@ void contractsDirectoryWithMavenIsNotCreatedIfSpringCloudContractVerifierIsNotRe
@Test
void contractsDirectoryWithGradleIsCreatedWithSpringCloudContractVerifier() {
ProjectRequest request = createProjectRequest("web", "cloud-contract-verifier");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("gradle-project");
ProjectStructure structure = generateProject(request);
assertThat(structure.getProjectDirectory().resolve("src/contractTest/resources/contracts")).exists()
Expand All @@ -64,7 +64,7 @@ void contractsDirectoryWithGradleIsCreatedWithSpringCloudContractVerifier() {
@Test
void contractsDirectoryWithGradleIsNotCreatedIfSpringCloudContractVerifierIsNotRequested() {
ProjectRequest request = createProjectRequest("web");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("gradle-project");
ProjectStructure structure = generateProject(request);
assertThat(structure.getProjectDirectory().resolve("src/contractTest/resources/contracts")).doesNotExist();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,40 @@
*/
class SpringCloudContractGradleBuildCustomizerTests extends AbstractExtensionTests {

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.3.0";

@Test
void springCloudContractVerifierPluginAddedWhenSCCDependencyPresent() {
ProjectRequest request = createProjectRequest("cloud-contract-verifier");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleBuild(request)).contains("id 'org.springframework.cloud.contract' version '");
}

@Test
void springCloudContractVerifierPluginNotAddedWhenSCCDependencyAbsent() {
ProjectRequest request = createProjectRequest();
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleBuild(request)).doesNotContain("org.springframework.cloud.contract");
}

@Test
void springCloudContractVerifierPluginContractTestWithJUnit5ByDefault() {
ProjectRequest request = createProjectRequest("cloud-contract-verifier");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleBuild(request)).containsSubsequence("tasks.named('contractTest') {", "useJUnitPlatform()");
}

@Test
void springCloudContractVerifierPluginWithGroovyDslAndWithTestModeSetWhenWebFluxIsPresent() {
ProjectRequest request = createProjectRequest("cloud-contract-verifier", "webflux");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleBuild(request)).containsSubsequence("contracts {", "testMode = 'WebTestClient'");
}

@Test
void springCloudContractVerifierPluginWithKotlinDslAndTestModeSetWhenWebFluxIsPresent() {
ProjectRequest request = createProjectRequest("cloud-contract-verifier", "webflux");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleKotlinDslBuild(request))
.contains("import org.springframework.cloud.contract.verifier.config.TestMode")
.containsSubsequence("contracts {", "testMode.set(TestMode.WEBTESTCLIENT)");
Expand All @@ -73,7 +73,7 @@ void springCloudContractVerifierPluginWithKotlinDslAndTestModeSetWhenWebFluxIsPr
@Test
void springWebTestClientDependencyAddedWhenWebFluxIsPresent() {
ProjectRequest request = createProjectRequest("cloud-contract-verifier", "webflux");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(gradleBuild(request)).contains("testImplementation 'io.rest-assured:spring-web-test-client'");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
class SpringCloudContractMavenBuildCustomizerTests extends AbstractExtensionTests {

private static final String SPRING_BOOT_VERSION = "3.2.0";
private static final String SPRING_BOOT_VERSION = "3.3.0";

@Test
void springCloudContractVerifierPluginAddedWhenSCCDependencyPresent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
*/
class SpringCloudFunctionBuildCustomizerTests extends AbstractExtensionTests {

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.3.0";

static final Dependency WEB_ADAPTER = Dependency.withId("cloud-function-web", "org.springframework.cloud",
"spring-cloud-function-web");

@Test
void functionOnly() {
ProjectRequest request = createProjectRequest("cloud-function");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-function"))
.hasDependency(Dependency.createSpringBootStarter("test", Dependency.SCOPE_TEST))
.hasDependency(Dependency.createSpringBootStarter(""))
Expand All @@ -52,7 +52,7 @@ void functionOnly() {
@Test
void web() {
ProjectRequest request = createProjectRequest("web", "cloud-function");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
BillOfMaterials bom = getBom("spring-cloud", request.getBootVersion());
assertThat(mavenPom(request)).hasDependency(getDependency("web"))
.hasDependency(WEB_ADAPTER)
Expand All @@ -65,7 +65,7 @@ void web() {
@Test
void webflux() {
ProjectRequest request = createProjectRequest("webflux", "cloud-function");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
BillOfMaterials bom = getBom("spring-cloud", request.getBootVersion());
assertThat(mavenPom(request)).hasDependency(getDependency("webflux"))
.hasDependency(WEB_ADAPTER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class SpringCloudFunctionHelpDocumentCustomizerTests extends AbstractExtensionTe

private static final String AZURE_SECTION_TITLE = "## Running Spring Cloud Function applications on Microsoft Azure";

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.2.0";

@Test
void functionBuildSetupInfoSectionAddedForMaven() {
ProjectRequest request = createProjectRequest();
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("maven-build");
request.setDependencies(Arrays.asList("cloud-function", "azure-support"));
assertThat(generateProject(request)).textFile("HELP.md").contains(AZURE_SECTION_TITLE);
Expand All @@ -47,7 +47,7 @@ void functionBuildSetupInfoSectionAddedForMaven() {
@Test
void functionBuildSetupInfoSectionAddedForGradle() {
ProjectRequest request = createProjectRequest();
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
request.setType("gradle-build");
request.setDependencies(Arrays.asList("cloud-function", "azure-support"));
assertThat(generateProject(request)).textFile("HELP.md").contains(AZURE_SECTION_TITLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
class SpringCloudStreamBuildCustomizerTests extends AbstractExtensionTests {

private static final String BOOT_VERSION = "3.2.6";
private static final String SPRING_BOOT_VERSION = "3.3.0";

private static final Dependency KAFKA_BINDER = Dependency.withId("cloud-stream-binder-kafka",
"org.springframework.cloud", "spring-cloud-stream-binder-kafka");
Expand All @@ -52,7 +52,7 @@ class SpringCloudStreamBuildCustomizerTests extends AbstractExtensionTests {
@Test
void springCloudStreamWithRabbit() {
ProjectRequest request = createProjectRequest("cloud-stream", "amqp");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-stream"))
.hasDependency(getDependency("amqp"))
.hasDependency(RABBIT_BINDER)
Expand All @@ -64,7 +64,7 @@ void springCloudStreamWithRabbit() {
@Test
void springCloudStreamWithKafka() {
ProjectRequest request = createProjectRequest("cloud-stream", "kafka");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-stream"))
.hasDependency(getDependency("kafka"))
.hasDependency(KAFKA_BINDER)
Expand All @@ -76,7 +76,7 @@ void springCloudStreamWithKafka() {
@Test
void springCloudStreamWithKafkaStreams() {
ProjectRequest request = createProjectRequest("cloud-stream", "kafka-streams");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-stream"))
.hasDependency(getDependency("kafka-streams"))
.hasDependency(KAFKA_STREAMS_BINDER)
Expand All @@ -88,7 +88,7 @@ void springCloudStreamWithKafkaStreams() {
@Test
void springCloudStreamWithPulsar() {
ProjectRequest request = createProjectRequest("cloud-stream", "pulsar");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-stream"))
.hasDependency(getDependency("pulsar"))
.hasDependency(PULSAR_BINDER)
Expand All @@ -98,7 +98,7 @@ void springCloudStreamWithPulsar() {
@Test
void springCloudStreamWithAllBinders() {
ProjectRequest request = createProjectRequest("cloud-stream", "amqp", "kafka", "kafka-streams");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-stream"))
.hasDependency(getDependency("amqp"))
.hasDependency(getDependency("kafka"))
Expand All @@ -114,7 +114,7 @@ void springCloudStreamWithAllBinders() {
@Test
void springCloudBusWithRabbit() {
ProjectRequest request = createProjectRequest("cloud-bus", "amqp");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-bus"))
.hasDependency(getDependency("amqp"))
.hasDependency(RABBIT_BINDER)
Expand All @@ -125,7 +125,7 @@ void springCloudBusWithRabbit() {
@Test
void springCloudBusWithKafka() {
ProjectRequest request = createProjectRequest("cloud-bus", "amqp");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-bus"))
.hasDependency(getDependency("amqp"))
.hasDependency(RABBIT_BINDER)
Expand All @@ -136,7 +136,7 @@ void springCloudBusWithKafka() {
@Test
void springCloudBusWithAllBinders() {
ProjectRequest request = createProjectRequest("cloud-bus", "amqp", "kafka", "kafka-streams");
request.setBootVersion(BOOT_VERSION);
request.setBootVersion(SPRING_BOOT_VERSION);
assertThat(mavenPom(request)).hasDependency(getDependency("cloud-bus"))
.hasDependency(getDependency("amqp"))
.hasDependency(getDependency("kafka"))
Expand Down

0 comments on commit 93748c3

Please sign in to comment.