Skip to content

Commit a4c4abe

Browse files
adityamparikhclaude
andcommitted
Upgrade to Spring Boot 4.0.0 with Spring Cloud 2025.1.0
Migrate all 77 modules from Spring Boot 2.3-3.1 to Spring Boot 4.0.0 with Spring Cloud Stream 5.0.0 and Spring Cloud 2025.1.0 (Oakwood). Key changes: - Centralize POM hierarchy: all modules inherit from root parent - javax.* -> jakarta.* namespace migration - EmbeddedKafkaRule (JUnit 4) -> @embeddedkafka / EmbeddedKafkaKraftBroker - Kafka Streams 4.0: KStream.branch() -> split().branch() API - TopologyTestDriver: ConsumerRecordFactory -> TestInputTopic/TestOutputTopic - Spring Cloud Stream 5.0: serdeError -> deserializationExceptionHandler - spring.cloud.stream.function.definition -> spring.cloud.function.definition - spring.profiles -> spring.config.activate.on-profile - KafkaTestUtils method signatures: int timeouts -> Duration - Boot 4 modular auto-config package relocations - Kotlin stdlib-jdk8 -> kotlin-stdlib - @spybean -> @MockitoSpyBean - Spring Security lambda DSL migration - Remove hardcoded dependency versions in favor of BOM management - Update Confluent, Avro, Testcontainers, and other third-party deps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2ff1168 commit a4c4abe

File tree

127 files changed

+915
-3837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+915
-3837
lines changed

batch-producer-consumer/pom.xml

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<description>Sample app using stream functions with batch producer and consumer using kafka</description>
1717
<properties>
1818
<java.version>17</java.version>
19-
<spring-cloud.version>2023.0.0-SNAPSHOT</spring-cloud.version>
2019
</properties>
2120
<dependencies>
2221
<dependency>
@@ -48,18 +47,6 @@
4847
<scope>test</scope>
4948
</dependency>
5049
</dependencies>
51-
<dependencyManagement>
52-
<dependencies>
53-
<dependency>
54-
<groupId>org.springframework.cloud</groupId>
55-
<artifactId>spring-cloud-dependencies</artifactId>
56-
<version>${spring-cloud.version}</version>
57-
<type>pom</type>
58-
<scope>import</scope>
59-
</dependency>
60-
</dependencies>
61-
</dependencyManagement>
62-
6350
<build>
6451
<plugins>
6552
<plugin>
@@ -79,69 +66,5 @@
7966
</plugins>
8067
</build>
8168

82-
<repositories>
83-
<repository>
84-
<id>spring-snapshots</id>
85-
<name>Spring Snapshots</name>
86-
<url>https://repo.spring.io/libs-snapshot-local</url>
87-
<snapshots>
88-
<enabled>true</enabled>
89-
</snapshots>
90-
<releases>
91-
<enabled>false</enabled>
92-
</releases>
93-
</repository>
94-
<repository>
95-
<id>spring-milestones</id>
96-
<name>Spring Milestones</name>
97-
<url>https://repo.spring.io/libs-milestone-local</url>
98-
<snapshots>
99-
<enabled>false</enabled>
100-
</snapshots>
101-
</repository>
102-
<repository>
103-
<id>spring-releases</id>
104-
<name>Spring Releases</name>
105-
<url>https://repo.spring.io/release</url>
106-
<snapshots>
107-
<enabled>false</enabled>
108-
</snapshots>
109-
</repository>
110-
<repository>
111-
<id>confluent</id>
112-
<url>https://packages.confluent.io/maven/</url>
113-
</repository>
114-
</repositories>
115-
116-
<pluginRepositories>
117-
<pluginRepository>
118-
<id>spring-snapshots</id>
119-
<name>Spring Snapshots</name>
120-
<url>https://repo.spring.io/libs-snapshot-local</url>
121-
<snapshots>
122-
<enabled>true</enabled>
123-
</snapshots>
124-
<releases>
125-
<enabled>false</enabled>
126-
</releases>
127-
</pluginRepository>
128-
<pluginRepository>
129-
<id>spring-milestones</id>
130-
<name>Spring Milestones</name>
131-
<url>https://repo.spring.io/libs-milestone-local</url>
132-
<snapshots>
133-
<enabled>false</enabled>
134-
</snapshots>
135-
</pluginRepository>
136-
<pluginRepository>
137-
<id>spring-releases</id>
138-
<name>Spring Releases</name>
139-
<url>https://repo.spring.io/libs-release-local</url>
140-
<snapshots>
141-
<enabled>false</enabled>
142-
</snapshots>
143-
</pluginRepository>
144-
</pluginRepositories>
145-
14669

14770
</project>

confluent-schema-registry-integration/pom.xml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependencies>
5656
<dependency>
5757
<groupId>org.springframework.boot</groupId>
58-
<artifactId>spring-boot-starter-web</artifactId>
58+
<artifactId>spring-boot-starter-webmvc</artifactId>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.springframework.cloud</groupId>
@@ -88,68 +88,5 @@
8888
</dependency>
8989
</dependencies>
9090

91-
<repositories>
92-
<repository>
93-
<id>spring-snapshots</id>
94-
<name>Spring Snapshots</name>
95-
<url>https://repo.spring.io/libs-snapshot-local</url>
96-
<snapshots>
97-
<enabled>true</enabled>
98-
</snapshots>
99-
<releases>
100-
<enabled>false</enabled>
101-
</releases>
102-
</repository>
103-
<repository>
104-
<id>spring-milestones</id>
105-
<name>Spring Milestones</name>
106-
<url>https://repo.spring.io/libs-milestone-local</url>
107-
<snapshots>
108-
<enabled>false</enabled>
109-
</snapshots>
110-
</repository>
111-
<repository>
112-
<id>spring-releases</id>
113-
<name>Spring Releases</name>
114-
<url>https://repo.spring.io/release</url>
115-
<snapshots>
116-
<enabled>false</enabled>
117-
</snapshots>
118-
</repository>
119-
<repository>
120-
<id>confluent</id>
121-
<url>https://packages.confluent.io/maven/</url>
122-
</repository>
123-
</repositories>
124-
125-
<pluginRepositories>
126-
<pluginRepository>
127-
<id>spring-snapshots</id>
128-
<name>Spring Snapshots</name>
129-
<url>https://repo.spring.io/libs-snapshot-local</url>
130-
<snapshots>
131-
<enabled>true</enabled>
132-
</snapshots>
133-
<releases>
134-
<enabled>false</enabled>
135-
</releases>
136-
</pluginRepository>
137-
<pluginRepository>
138-
<id>spring-milestones</id>
139-
<name>Spring Milestones</name>
140-
<url>https://repo.spring.io/libs-milestone-local</url>
141-
<snapshots>
142-
<enabled>false</enabled>
143-
</snapshots>
144-
</pluginRepository>
145-
<pluginRepository>
146-
<id>spring-releases</id>
147-
<name>Spring Releases</name>
148-
<url>https://repo.spring.io/libs-release-local</url>
149-
<snapshots>
150-
<enabled>false</enabled>
151-
</snapshots>
152-
</pluginRepository>
153-
</pluginRepositories>
15491

15592
</project>

function-based-stream-app-samples/couchbase-stream-applications/couchbase-consumer/pom.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,27 @@
4242
</dependency>
4343
<dependency>
4444
<groupId>org.testcontainers</groupId>
45-
<artifactId>couchbase</artifactId>
45+
<artifactId>testcontainers-couchbase</artifactId>
4646
<scope>test</scope>
4747
</dependency>
4848
<dependency>
4949
<groupId>org.testcontainers</groupId>
50-
<artifactId>junit-jupiter</artifactId>
50+
<artifactId>testcontainers-junit-jupiter</artifactId>
5151
<scope>test</scope>
5252
</dependency>
5353
</dependencies>
5454

55+
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-maven-plugin</artifactId>
61+
<configuration>
62+
<skip>true</skip>
63+
</configuration>
64+
</plugin>
65+
</plugins>
66+
</build>
67+
5568
</project>

function-based-stream-app-samples/couchbase-stream-applications/couchbase-consumer/src/main/java/io/spring/example/couchbase/consumer/CouchbaseConsumerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package io.spring.example.couchbase.consumer;
1818

19-
import javax.validation.constraints.NotNull;
19+
import jakarta.validation.constraints.NotNull;
2020

2121
import org.springframework.boot.context.properties.ConfigurationProperties;
2222
import org.springframework.expression.Expression;

function-based-stream-app-samples/couchbase-stream-applications/couchbase-consumer/src/test/java/io/spring/example/couchbase/consumer/CouchbaseConsumerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.function.Consumer;
2222
import java.util.function.Function;
2323

24-
import javax.annotation.PreDestroy;
24+
import jakarta.annotation.PreDestroy;
2525

2626
import com.couchbase.client.java.Bucket;
2727
import com.couchbase.client.java.Cluster;

function-based-stream-app-samples/couchbase-stream-applications/couchbase-sink/README.adoc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,4 @@ The **$$couchbase$$** $$sink$$ has the following options:
44

55

66
//tag::configuration-properties[]
7-
Properties grouped by prefix:
8-
9-
10-
=== couchbase.consumer
11-
12-
$$bucket-expression$$:: $$A SpEL expression to specify the bucket.$$ *($$Expression$$, default: `$$<none>$$`)*
13-
$$collection-expression$$:: $$A SpEL expression to specify the collection.$$ *($$Expression$$, default: `$$<none>$$`)*
14-
$$key-expression$$:: $$A SpEL expression to specify the key.$$ *($$Expression$$, default: `$$<none>$$`)*
15-
$$value-expression$$:: $$A SpEL expression to specify the value (default is payload).$$ *($$Expression$$, default: `$$<none>$$`)*
16-
17-
=== spring.couchbase
18-
19-
$$connection-string$$:: $$Connection string used to locate the Couchbase cluster.$$ *($$String$$, default: `$$<none>$$`)*
20-
$$password$$:: $$Cluster password.$$ *($$String$$, default: `$$<none>$$`)*
21-
$$username$$:: $$Cluster username.$$ *($$String$$, default: `$$<none>$$`)*
227
//end::configuration-properties[]

function-based-stream-app-samples/couchbase-stream-applications/couchbase-sink/pom.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,22 @@
3939
</dependency>
4040
<dependency>
4141
<groupId>org.springframework.cloud</groupId>
42-
<artifactId>spring-cloud-stream</artifactId>
43-
<type>test-jar</type>
44-
<classifier>test-binder</classifier>
42+
<artifactId>spring-cloud-stream-test-binder</artifactId>
4543
<scope>test</scope>
4644
</dependency>
4745
<dependency>
4846
<groupId>org.testcontainers</groupId>
49-
<artifactId>couchbase</artifactId>
47+
<artifactId>testcontainers-couchbase</artifactId>
5048
<scope>test</scope>
5149
</dependency>
5250
<dependency>
5351
<groupId>org.testcontainers</groupId>
54-
<artifactId>kafka</artifactId>
52+
<artifactId>testcontainers-kafka</artifactId>
5553
<scope>test</scope>
5654
</dependency>
5755
<dependency>
5856
<groupId>org.testcontainers</groupId>
59-
<artifactId>junit-jupiter</artifactId>
57+
<artifactId>testcontainers-junit-jupiter</artifactId>
6058
<scope>test</scope>
6159
</dependency>
6260
<dependency>

function-based-stream-app-samples/couchbase-stream-applications/pom.xml

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.4.4</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>io.spring.cloud.stream.sample</groupId>
7+
<artifactId>function-based-stream-app-samples</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<relativePath>..</relativePath>
1010
</parent>
1111
<groupId>io.spring.example</groupId>
1212
<artifactId>couchbase-stream-applications</artifactId>
@@ -16,11 +16,7 @@
1616
<description>Demo Stream Applications project for Couchhbase</description>
1717

1818
<properties>
19-
<java.version>8</java.version>
20-
<spring-cloud.version>2020.0.2</spring-cloud.version>
21-
<playtika-testcontainers.version>1.86</playtika-testcontainers.version>
22-
<couchbase-java-client.version>3.0.10</couchbase-java-client.version>
23-
<test-containers.version>1.15.1</test-containers.version>
19+
<couchbase-java-client.version>3.7.5</couchbase-java-client.version>
2420
</properties>
2521

2622

@@ -36,48 +32,9 @@
3632
<artifactId>java-client</artifactId>
3733
<version>${couchbase-java-client.version}</version>
3834
</dependency>
39-
<dependency>
40-
<groupId>org.springframework.cloud</groupId>
41-
<artifactId>spring-cloud-dependencies</artifactId>
42-
<version>${spring-cloud.version}</version>
43-
<type>pom</type>
44-
<scope>import</scope>
45-
</dependency>
46-
<dependency>
47-
<groupId>org.testcontainers</groupId>
48-
<artifactId>testcontainers-bom</artifactId>
49-
<version>${test-containers.version}</version>
50-
<type>pom</type>
51-
<scope>import</scope>
52-
</dependency>
5335
</dependencies>
5436
</dependencyManagement>
5537

56-
<repositories>
57-
<repository>
58-
<id>spring-milestones</id>
59-
<name>Spring Milestones</name>
60-
<url>https://repo.spring.io/milestone</url>
61-
</repository>
62-
</repositories>
63-
64-
<pluginRepositories>
65-
<pluginRepository>
66-
<id>spring-milestones</id>
67-
<name>Spring Milestones</name>
68-
<url>https://repo.spring.io/milestone</url>
69-
</pluginRepository>
70-
71-
<pluginRepository>
72-
<id>spring-snapshots</id>
73-
<name>Spring Snapshots</name>
74-
<url>https://repo.spring.io/snapshot</url>
75-
<snapshots>
76-
<enabled>true</enabled>
77-
</snapshots>
78-
</pluginRepository>
79-
</pluginRepositories>
80-
8138
<build>
8239
<plugins>
8340
<plugin>

function-based-stream-app-samples/image-thumbnail-samples/image-thumbnail-processor/pom.xml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.4.4</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>io.spring.cloud.stream.sample</groupId>
7+
<artifactId>image-thumbnail-samples</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<relativePath>..</relativePath>
1010
</parent>
1111
<groupId>io.spring.cloud.stream.sample</groupId>
1212
<artifactId>image-thumbnail-processor</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
1414
<name>image-thumbnail-processor</name>
1515
<description>Thumbnail processor</description>
1616

17-
<properties>
18-
<java.version>8</java.version>
19-
</properties>
20-
2117
<dependencies>
2218
<dependency>
2319
<groupId>org.junit.jupiter</groupId>
@@ -38,4 +34,17 @@
3834
</dependency>
3935
</dependencies>
4036

37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-maven-plugin</artifactId>
43+
<configuration>
44+
<skip>true</skip>
45+
</configuration>
46+
</plugin>
47+
</plugins>
48+
</build>
49+
4150
</project>

0 commit comments

Comments
 (0)