Skip to content

Java migration guide: Spring Boot 4 test code changes - #2734

Merged
agoerler merged 1 commit into
mainfrom
migration_testing
Jul 9, 2026
Merged

Java migration guide: Spring Boot 4 test code changes#2734
agoerler merged 1 commit into
mainfrom
migration_testing

Conversation

@rjayasinghe

Copy link
Copy Markdown
Contributor

Adds a new subsection Test Code Changes under the existing Spring Boot 4 section in the CAP Java 4 → 5 migration guide (java/migration.md).

CAP Java 5 mandates Spring Boot 4. Normal application code is rarely affected because it doesn't touch Spring Boot's APIs directly, but test code typically does — Spring Boot 4's new module structure causes package name changes that can break existing test classes (e.g. the test slice annotations like @AutoConfigureMockMvc, @WebMvcTest, @DataJpaTest).

The new subsection:

  • explains why test code is more affected than application code,
  • links to the Test Code section of the official Spring Boot 4.0 Migration Guide,
  • notes that these changes are already covered by the OpenRewrite community recipes and the commercial Moderne platform recipes, and cross-links back to the existing "Automatic CAP Java Migrations with OpenRewrite" section so users can apply both together.

@agoerler agoerler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@agoerler
agoerler added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 243e5e6 Jul 9, 2026
4 checks passed
@agoerler
agoerler deleted the migration_testing branch July 9, 2026 08:54
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