Skip to content

Conversation

@osoykan
Copy link
Collaborator

@osoykan osoykan commented Dec 8, 2025

PR: Add Spring Boot 4.x support and improve DX

Summary

Add Spring Boot 4.x support with unified modules and improve developer experience.

Changes

Spring Boot 4.x Support

  • Single stove-spring-testing-e2e and stove-spring-testing-e2e-kafka modules now support Spring Boot 2.7+, 3.x, and 4.x
  • Uses reflection-based sendCompatible() to handle Kafka API differences across versions

Developer Experience

  • KafkaSystemOptions.ops now defaults to defaultKafkaOps()
  • Added runtime checks with clear error messages when Spring Boot or Spring Kafka is missing from classpath

Copilot AI review requested due to automatic review settings December 8, 2025 16:44
@osoykan osoykan marked this pull request as draft December 8, 2025 16:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for Spring Boot 4.x and Spring Kafka 4.x by creating new dedicated modules (stove-spring-4x-testing-e2e and stove-spring-4x-testing-e2e-kafka) alongside the existing Spring Boot 2.x/3.x modules. The changes include compatibility adjustments for API differences between versions and a working example application.

Key Changes

  • Added type constraints (K : Any, V : Any) to TestSystemKafkaInterceptor for Spring Kafka 4.x compatibility
  • Created new Spring 4x modules with updated APIs (using BeanRegistrarDsl instead of BeanDefinitionDsl)
  • Implemented KafkaTemplateCompatibility to handle Spring Kafka 4.x's CompletableFuture-based send API
  • Added Jackson 3 support (tools.jackson) for Spring Boot 4.x example
  • Included comprehensive test suites for Kafka with string and protobuf serialization

Reviewed changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/TestSystemInterceptor.kt Added non-nullable type constraints to generic parameters
starters/spring/stove-spring-4x-testing-e2e/src/main/kotlin/com/trendyol/stove/testing/e2e/BaseApplicationContextInitializer.kt New bean registration API using BeanRegistrarDsl
starters/spring/stove-spring-4x-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/KafkaTemplateCompatibility.kt Compatibility layer for async send operations
starters/spring/stove-spring-4x-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/TestSystemInterceptor.kt Spring 4x version with updated type constraints
examples/spring-4x-example/ Complete example application demonstrating Spring Boot 4.x with Kafka
gradle/libs.versions.toml Added Spring Boot 4.x and Jackson 3 dependencies
settings.gradle.kts Registered new modules in project structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 79.81651% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.00%. Comparing base (cc8dde7) to head (73a4598).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...endyol/stove/testing/e2e/SpringBootVersionCheck.kt 9.09% 10 Missing ⚠️
...stove/testing/e2e/kafka/SpringKafkaVersionCheck.kt 25.00% 3 Missing ⚠️
...c/main/kotlin/stove/spring/example4x/ExampleApp.kt 50.00% 2 Missing ⚠️
...ve/testing/e2e/kafka/KafkaTemplateCompatibility.kt 81.81% 1 Missing and 1 partial ⚠️
...in/com/trendyol/stove/testing/e2e/kafka/Options.kt 50.00% 2 Missing ⚠️
...frastructure/messaging/kafka/KafkaConfiguration.kt 96.66% 0 Missing and 1 partial ⚠️
...l/stove/testing/e2e/kafka/TestSystemInterceptor.kt 50.00% 1 Missing ⚠️
...kotlin/com/trendyol/stove/testing/e2e/registrar.kt 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #934      +/-   ##
==========================================
+ Coverage   76.82%   78.00%   +1.17%     
==========================================
  Files          91      111      +20     
  Lines        2969     3655     +686     
  Branches      242      306      +64     
==========================================
+ Hits         2281     2851     +570     
- Misses        561      624      +63     
- Partials      127      180      +53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@osoykan osoykan marked this pull request as ready for review December 9, 2025 10:28
@osoykan osoykan merged commit 86a21c6 into main Dec 9, 2025
8 checks passed
@osoykan osoykan deleted the feat/spring-boot-4x branch December 9, 2025 10:30
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.

2 participants