Skip to content

Conversation

@adityamparikh
Copy link

Summary

  • Upgrade 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)
  • Centralize POM hierarchy: all leaf modules now inherit from a single root parent instead of individual spring-boot-starter-parent declarations, eliminating duplicated dependency management across ~40 modules
  • Full test suite passes: ./mvnw install completes with BUILD SUCCESS across all modules

Migration details

Area Changes
Build Centralized POM hierarchy, BOM-managed dependencies, removed ~40 duplicate <dependencyManagement> blocks
Jakarta javax.persistence, javax.validation, javax.transaction, javax.annotationjakarta.*
Kafka Streams 4.0 KStream.branch(Predicate...)split().branch() API; TopologyTestDriverTestInputTopic/TestOutputTopic; cache.max.bytes.bufferingstatestore.cache.max.bytes
Spring Kafka 4.0 EmbeddedKafkaRule@EmbeddedKafka / EmbeddedKafkaKraftBroker; KafkaTestUtils int timeouts → Duration
Spring Cloud Stream 5.0 serdeErrordeserializationExceptionHandler; spring.cloud.stream.function.definitionspring.cloud.function.definition
Spring Boot 4.0 Modular auto-config package relocations; spring.profilesspring.config.activate.on-profile; spring-boot-starter-webflux-test for relocated AutoConfigureWebTestClient
Testing @SpyBean@MockitoSpyBean; JUnit 4 → JUnit 5 throughout; @DynamicPropertySource for embedded Kafka setup
Kotlin kotlin-stdlib-jdk8kotlin-stdlib; removed pinned Kotlin versions (Boot-managed)
Security Lambda DSL migration (.csrf().disable().csrf(csrf -> csrf.disable()))
Dependencies Removed hardcoded versions for kafka-streams-test-utils, Confluent, Avro, Testcontainers, MariaDB, etc. in favor of BOM management

Modules affected

All 18 top-level module groups (127 files changed, 915 insertions, 3837 deletions):

confluent-schema-registry-integration · function-based-stream-app-samples · kafka-batch-sample · kafka-binder-native-app · kafka-e2e-kotlin-sample · kafka-native-serialization · kafka-security-samples · kafka-streams-samples (17 sub-modules) · kinesis-samples · kotlin-rabbit-functions · multi-binder-samples (6 sub-modules) · multi-functions-samples · partitioning-samples · routing-samples · schema-registry-integration · batch-producer-consumer · testing-samples · transaction-kafka-samples

Test plan

  • ./mvnw install --fail-at-end passes with BUILD SUCCESS across all 77 modules
  • All Kafka Streams topology tests pass (branching, word-count, inventory-count, aggregate, DLQ, recoverable)
  • All multi-binder tests pass (two-kafka-clusters, sendto-dest-header, kafka-streams)
  • Schema registry consumer test passes with stub client
  • Testing-demo JDBC sink test passes with embedded Kafka
  • Kafka batch sample test passes with @EmbeddedKafka

🤖 Generated with Claude Code

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>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
@adityamparikh adityamparikh force-pushed the upgrade/spring-boot-4.0 branch from a4c4abe to 9e61c4a Compare February 2, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant