Skip to content

✨ Add Spring Boot 2.x to 3.0 migration rules#340

Open
dymurray wants to merge 1 commit intokonveyor:mainfrom
dymurray:spring-boot-migration
Open

✨ Add Spring Boot 2.x to 3.0 migration rules#340
dymurray wants to merge 1 commit intokonveyor:mainfrom
dymurray:spring-boot-migration

Conversation

@dymurray
Copy link
Contributor

@dymurray dymurray commented Jan 20, 2026

This PR adds comprehensive rules to assist with migrating from Spring Boot 2.x to 3.0, addressing all 17 open issues with spring-boot-migration/3.0 label.

New Rule Files Created

  • spring-boot-2.x-to-3.0-actuator.yaml (4 rules)
  • spring-boot-2.x-to-3.0-micrometer.yaml (4 rules)

Rules Added to Existing Files

Core Changes (spring-boot-2.x-to-3.0-core-changes.yaml)

  • 00040: Configuration properties migrator recommendation
  • 00050: Logging date format change (ISO-8601)
  • 00060: Jakarta EE 9+ requirement

Web Application Changes (spring-boot-2.x-to-3.0-webapp-changes.yaml)

  • 00020: Jetty 11+ requirement
  • 00030: Path matching strategy changes
  • 00040: ErrorController implementation updates

Security (spring-boot-2.x-to-3.0-security.yaml)

  • 00020: WebSecurityConfigurerAdapter removal
  • 00030: authorizeRequests() deprecated
  • 00040: Lambda DSL migration
  • 00050: @secured annotation review

Session (spring-boot-2.x-to-3.0-session.yaml)

  • 00010: Spring Session 3.0 requirement
  • 00020: Configuration property review

Datasource (spring-boot-2.x-to-3.0-datasource.yaml)

  • 00070: MySQL JDBC driver coordinates changed

Dependencies (spring-boot-2.x-to-3.0-dependencies.yaml)

  • 00020: Spring Boot parent version check
  • 00021: Hazelcast 5.x requirement

Issues Addressed

Fixes #180, #181, #183, #184, #185, #186, #187, #188, #189, #190, #208, #215, #217, #218, #219, #227, #233

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Spring Boot 3.0 migration guide covering 17 migration issues with detailed rules and guidelines for Core, Web Application, Security, Session Management, Datasource, Dependencies, Actuator, and Micrometer components.

✏️ Tip: You can customize this high-level summary in your review settings.

This PR adds comprehensive rules to assist with migrating from Spring
Boot 2.x to 3.0, addressing all 17 open issues with spring-boot-migration/3.0 label.

## New Rule Files Created
- spring-boot-2.x-to-3.0-actuator.yaml (4 rules)
- spring-boot-2.x-to-3.0-micrometer.yaml (4 rules)

## Rules Added to Existing Files

### Core Changes (spring-boot-2.x-to-3.0-core-changes.yaml)
- 00040: Configuration properties migrator recommendation
- 00050: Logging date format change (ISO-8601)
- 00060: Jakarta EE 9+ requirement

### Web Application Changes (spring-boot-2.x-to-3.0-webapp-changes.yaml)
- 00020: Jetty 11+ requirement
- 00030: Path matching strategy changes
- 00040: ErrorController implementation updates

### Security (spring-boot-2.x-to-3.0-security.yaml)
- 00020: WebSecurityConfigurerAdapter removal
- 00030: authorizeRequests() deprecated
- 00040: Lambda DSL migration
- 00050: @secured annotation review

### Session (spring-boot-2.x-to-3.0-session.yaml)
- 00010: Spring Session 3.0 requirement
- 00020: Configuration property review

### Datasource (spring-boot-2.x-to-3.0-datasource.yaml)
- 00070: MySQL JDBC driver coordinates changed

### Dependencies (spring-boot-2.x-to-3.0-dependencies.yaml)
- 00020: Spring Boot parent version check
- 00021: Hazelcast 5.x requirement

## Issues Addressed
Fixes konveyor#180, konveyor#181, konveyor#183, konveyor#184, konveyor#185, konveyor#186, konveyor#187, konveyor#188, konveyor#189, konveyor#190, konveyor#208, konveyor#215, konveyor#217, konveyor#218, konveyor#219, konveyor#227, konveyor#233

Signed-off-by: Dylan Murray <dymurray@redhat.com>
@dymurray dymurray changed the title Add Spring Boot 2.x to 3.0 migration rules ✨ Add Spring Boot 2.x to 3.0 migration rules Jan 20, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

A new documentation file summarizing Spring Boot 3.0 migration rule implementations. The document enumerates 17 addressed issues, identifies two new rule files created for Actuator and Micrometer migrations, and categorizes all new rules across eight implementation areas.

Changes

Cohort / File(s) Change Summary
Spring Boot Migration Documentation
SPRING_BOOT_MIGRATION_SUMMARY.md
Added comprehensive summary document detailing 17 Spring Boot 3.0 migration issues addressed, corresponding rule files and IDs, and organized rule categorization across Core, Web Application, Security, Session, Datasource, Dependencies, Actuator, and Micrometer areas.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hopping through migrations with glee,
Seventeen issues now plain to see,
Actuator, Micrometer, rules so bright,
Spring Boot's journey documented right! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title is concise and clearly describes the main change: adding Spring Boot 2.x to 3.0 migration rules. It accurately reflects the PR's primary objective.
Linked Issues check ✅ Passed PR addresses issue #180 requirements by creating dependency review rules (Hazelcast 5.x, MySQL driver, Spring Boot parent version checks) as specified in the linked issue.
Out of Scope Changes check ✅ Passed All changes are in-scope: documentation summary file and rule files address Spring Boot 2.x to 3.0 migration, which aligns with the PR objectives and linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@SPRING_BOOT_MIGRATION_SUMMARY.md`:
- Around line 5-8: Change the absolute claim under the heading "## Issues
Addressed (17)" to a tentative phrasing; replace "All issues with the
`spring-boot-migration/3.0` label have been addressed:" with a softer statement
such as "This PR aims to address issues labeled `spring-boot-migration/3.0`:"
(or "Attempted to address...") so the document no longer asserts guaranteed
closure.
- Around line 9-27: The table uses abbreviated rule filenames (e.g.,
"dependencies.yaml", "security.yaml", "actuator.yaml", "micrometer.yaml");
update each entry to the full rule filenames used in the repo (e.g.,
"spring-boot-2.x-to-3.0-dependencies.yaml",
"spring-boot-2.x-to-3.0-security.yaml", "spring-boot-2.x-to-3.0-actuator.yaml",
"spring-boot-2.x-to-3.0-micrometer.yaml") for all affected rows (referenced by
Issue IDs like `#180`, `#181`, `#187`, `#188`, `#217`, `#218`, `#219`, etc.), ensuring the
full filenames replace the short names consistently across the table so there is
no ambiguity.

Comment on lines +5 to +8
## Issues Addressed (17)

All issues with the `spring-boot-migration/3.0` label have been addressed:

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid absolute “all issues addressed” phrasing unless confirmed.

If issue closure isn’t guaranteed at doc time, consider softer wording like “This PR aims to address…” to prevent over-claiming.

Suggested tweak
-All issues with the `spring-boot-migration/3.0` label have been addressed:
+This PR aims to address all issues with the `spring-boot-migration/3.0` label:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Issues Addressed (17)
All issues with the `spring-boot-migration/3.0` label have been addressed:
## Issues Addressed (17)
This PR aims to address all issues with the `spring-boot-migration/3.0` label:
🤖 Prompt for AI Agents
In `@SPRING_BOOT_MIGRATION_SUMMARY.md` around lines 5 - 8, Change the absolute
claim under the heading "## Issues Addressed (17)" to a tentative phrasing;
replace "All issues with the `spring-boot-migration/3.0` label have been
addressed:" with a softer statement such as "This PR aims to address issues
labeled `spring-boot-migration/3.0`:" (or "Attempted to address...") so the
document no longer asserts guaranteed closure.

Comment on lines +9 to +27
| Issue | Title | Rule File | Rule ID(s) |
|-------|-------|-----------|------------|
| #180 | Dependency review | dependencies.yaml | 00020, 00021 |
| #181 | Spring Security 6.0 migration | security.yaml | 00020-00050 |
| #183 | Configuration properties migrator | core-changes.yaml | 00040 |
| #184 | JakartaEE requirements | core-changes.yaml | 00060 |
| #185 | Core changes | core-changes.yaml | 00040-00060 |
| #186 | Web application changes | webapp-changes.yaml | 00020-00040 |
| #187 | Actuator changes | actuator.yaml (new) | 00010-00040 |
| #188 | Micrometer and metrics changes | micrometer.yaml (new) | 00010-00040 |
| #189 | Spring Security changes | security.yaml | 00020-00050 |
| #190 | Session changes | session.yaml | 00010-00020 |
| #208 | Logging date format | core-changes.yaml | 00050 |
| #215 | Jetty | webapp-changes.yaml | 00020 |
| #217 | Micrometer deprecation | micrometer.yaml | 00010, 00030 |
| #218 | Tag providers migration | micrometer.yaml | 00010 |
| #219 | JvmInfoMetrics auto-config | micrometer.yaml | 00020 |
| #227 | MySQL JDBC Driver | datasource.yaml | 00070 |
| #233 | Gradle and Maven session | session.yaml | 00010-00020 |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use full rule filenames for clarity and consistency.

The table lists shortened filenames (e.g., dependencies.yaml, security.yaml, actuator.yaml, micrometer.yaml), but the actual files appear to be spring-boot-2.x-to-3.0-*.yaml. Using the full filenames avoids ambiguity and aligns with the rest of the PR context.

Proposed edit
-| `#180` | Dependency review | dependencies.yaml | 00020, 00021 |
-| `#181` | Spring Security 6.0 migration | security.yaml | 00020-00050 |
-| `#183` | Configuration properties migrator | core-changes.yaml | 00040 |
-| `#184` | JakartaEE requirements | core-changes.yaml | 00060 |
-| `#185` | Core changes | core-changes.yaml | 00040-00060 |
-| `#186` | Web application changes | webapp-changes.yaml | 00020-00040 |
-| `#187` | Actuator changes | actuator.yaml (new) | 00010-00040 |
-| `#188` | Micrometer and metrics changes | micrometer.yaml (new) | 00010-00040 |
-| `#189` | Spring Security changes | security.yaml | 00020-00050 |
-| `#190` | Session changes | session.yaml | 00010-00020 |
-| `#208` | Logging date format | core-changes.yaml | 00050 |
-| `#215` | Jetty | webapp-changes.yaml | 00020 |
-| `#217` | Micrometer deprecation | micrometer.yaml | 00010, 00030 |
-| `#218` | Tag providers migration | micrometer.yaml | 00010 |
-| `#219` | JvmInfoMetrics auto-config | micrometer.yaml | 00020 |
-| `#227` | MySQL JDBC Driver | datasource.yaml | 00070 |
-| `#233` | Gradle and Maven session | session.yaml | 00010-00020 |
+| `#180` | Dependency review | spring-boot-2.x-to-3.0-dependencies.yaml | 00020, 00021 |
+| `#181` | Spring Security 6.0 migration | spring-boot-2.x-to-3.0-security.yaml | 00020-00050 |
+| `#183` | Configuration properties migrator | spring-boot-2.x-to-3.0-core-changes.yaml | 00040 |
+| `#184` | JakartaEE requirements | spring-boot-2.x-to-3.0-core-changes.yaml | 00060 |
+| `#185` | Core changes | spring-boot-2.x-to-3.0-core-changes.yaml | 00040-00060 |
+| `#186` | Web application changes | spring-boot-2.x-to-3.0-webapp-changes.yaml | 00020-00040 |
+| `#187` | Actuator changes | spring-boot-2.x-to-3.0-actuator.yaml (new) | 00010-00040 |
+| `#188` | Micrometer and metrics changes | spring-boot-2.x-to-3.0-micrometer.yaml (new) | 00010-00040 |
+| `#189` | Spring Security changes | spring-boot-2.x-to-3.0-security.yaml | 00020-00050 |
+| `#190` | Session changes | spring-boot-2.x-to-3.0-session.yaml | 00010-00020 |
+| `#208` | Logging date format | spring-boot-2.x-to-3.0-core-changes.yaml | 00050 |
+| `#215` | Jetty | spring-boot-2.x-to-3.0-webapp-changes.yaml | 00020 |
+| `#217` | Micrometer deprecation | spring-boot-2.x-to-3.0-micrometer.yaml | 00010, 00030 |
+| `#218` | Tag providers migration | spring-boot-2.x-to-3.0-micrometer.yaml | 00010 |
+| `#219` | JvmInfoMetrics auto-config | spring-boot-2.x-to-3.0-micrometer.yaml | 00020 |
+| `#227` | MySQL JDBC Driver | spring-boot-2.x-to-3.0-datasource.yaml | 00070 |
+| `#233` | Gradle and Maven session | spring-boot-2.x-to-3.0-session.yaml | 00010-00020 |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Issue | Title | Rule File | Rule ID(s) |
|-------|-------|-----------|------------|
| #180 | Dependency review | dependencies.yaml | 00020, 00021 |
| #181 | Spring Security 6.0 migration | security.yaml | 00020-00050 |
| #183 | Configuration properties migrator | core-changes.yaml | 00040 |
| #184 | JakartaEE requirements | core-changes.yaml | 00060 |
| #185 | Core changes | core-changes.yaml | 00040-00060 |
| #186 | Web application changes | webapp-changes.yaml | 00020-00040 |
| #187 | Actuator changes | actuator.yaml (new) | 00010-00040 |
| #188 | Micrometer and metrics changes | micrometer.yaml (new) | 00010-00040 |
| #189 | Spring Security changes | security.yaml | 00020-00050 |
| #190 | Session changes | session.yaml | 00010-00020 |
| #208 | Logging date format | core-changes.yaml | 00050 |
| #215 | Jetty | webapp-changes.yaml | 00020 |
| #217 | Micrometer deprecation | micrometer.yaml | 00010, 00030 |
| #218 | Tag providers migration | micrometer.yaml | 00010 |
| #219 | JvmInfoMetrics auto-config | micrometer.yaml | 00020 |
| #227 | MySQL JDBC Driver | datasource.yaml | 00070 |
| #233 | Gradle and Maven session | session.yaml | 00010-00020 |
| Issue | Title | Rule File | Rule ID(s) |
|-------|-------|-----------|------------|
| `#180` | Dependency review | spring-boot-2.x-to-3.0-dependencies.yaml | 00020, 00021 |
| `#181` | Spring Security 6.0 migration | spring-boot-2.x-to-3.0-security.yaml | 00020-00050 |
| `#183` | Configuration properties migrator | spring-boot-2.x-to-3.0-core-changes.yaml | 00040 |
| `#184` | JakartaEE requirements | spring-boot-2.x-to-3.0-core-changes.yaml | 00060 |
| `#185` | Core changes | spring-boot-2.x-to-3.0-core-changes.yaml | 00040-00060 |
| `#186` | Web application changes | spring-boot-2.x-to-3.0-webapp-changes.yaml | 00020-00040 |
| `#187` | Actuator changes | spring-boot-2.x-to-3.0-actuator.yaml (new) | 00010-00040 |
| `#188` | Micrometer and metrics changes | spring-boot-2.x-to-3.0-micrometer.yaml (new) | 00010-00040 |
| `#189` | Spring Security changes | spring-boot-2.x-to-3.0-security.yaml | 00020-00050 |
| `#190` | Session changes | spring-boot-2.x-to-3.0-session.yaml | 00010-00020 |
| `#208` | Logging date format | spring-boot-2.x-to-3.0-core-changes.yaml | 00050 |
| `#215` | Jetty | spring-boot-2.x-to-3.0-webapp-changes.yaml | 00020 |
| `#217` | Micrometer deprecation | spring-boot-2.x-to-3.0-micrometer.yaml | 00010, 00030 |
| `#218` | Tag providers migration | spring-boot-2.x-to-3.0-micrometer.yaml | 00010 |
| `#219` | JvmInfoMetrics auto-config | spring-boot-2.x-to-3.0-micrometer.yaml | 00020 |
| `#227` | MySQL JDBC Driver | spring-boot-2.x-to-3.0-datasource.yaml | 00070 |
| `#233` | Gradle and Maven session | spring-boot-2.x-to-3.0-session.yaml | 00010-00020 |
🤖 Prompt for AI Agents
In `@SPRING_BOOT_MIGRATION_SUMMARY.md` around lines 9 - 27, The table uses
abbreviated rule filenames (e.g., "dependencies.yaml", "security.yaml",
"actuator.yaml", "micrometer.yaml"); update each entry to the full rule
filenames used in the repo (e.g., "spring-boot-2.x-to-3.0-dependencies.yaml",
"spring-boot-2.x-to-3.0-security.yaml", "spring-boot-2.x-to-3.0-actuator.yaml",
"spring-boot-2.x-to-3.0-micrometer.yaml") for all affected rows (referenced by
Issue IDs like `#180`, `#181`, `#187`, `#188`, `#217`, `#218`, `#219`, etc.), ensuring the
full filenames replace the short names consistently across the table so there is
no ambiguity.

or:
- builtin.filecontent:
pattern: "management.endpoints.jmx.exposure"
filePattern: "application*.properties"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say let's change this filePattern and the one right below to .*\.properties (we also need to escape the dot)

url: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#actuator-changes

- ruleID: spring-boot-2.x-to-3.0-actuator-00020
category: mandatory
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be potential according to the title

management.endpoint.health.group.custom.include=customHealthIndicator
management.endpoint.health.group.custom.show-details=always
```
links:
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing the migration guide link here

location: IMPLEMENTS_TYPE
- java.referenced:
pattern: org.springframework.boot.actuate.health.AbstractHealthIndicator
description: HealthIndicator implementation updates for Spring Boot 3.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only mention I find of the health indicator in the guide, but it's related to MongoDB... Wondering if this is right? Could you double check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it looks like this was hallucination, thinking I should remove

when:
builtin.filecontent:
pattern: "management.server.base-path"
filePattern: "application*.properties"
Copy link
Contributor

Choose a reason for hiding this comment

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

Change pattern, similar to previous comment

- Better integration with distributed tracing
links:
- title: 'Micrometer Observation'
url: https://micrometer.io/docs/observation
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing migration guide link

link: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#saml2-relying-party-configuration No newline at end of file
url: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#saml2-relying-party-configuration

- ruleID: spring-boot-2.x-to-3.0-security-00020
Copy link
Contributor

Choose a reason for hiding this comment

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

All these new rules in this file belong in the Spring Framework 5 to 6 path, not here

description: Jetty must be upgraded to version 11+ for Spring Boot 3.0
message: |
Spring Boot 3.0 requires Jetty 11 or later. Jetty 11 is the first version to support
Jakarta EE 9 (Servlet 5.0 API with `jakarta.servlet` namespace).
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering where this came from? This is what the migration guide says:

Jetty does not yet support Servlet 6.0. To use Jetty with Spring Boot 3.0, you will have to downgrade the Servlet API to 5.0. You can use the jakarta-servlet.version property to do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking online it appears that Jetty 11 is the suggested version for 3.0. I don't know if this is a hard and fast rule or not.

filePattern: "application*.properties"
- builtin.filecontent:
pattern: "pathmatch"
filePattern: "application*.yml"
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, we need to fix the filePattern fields above with .*\.properties. We also need to add both yml and yaml, or use a regex there (I guess y[a]*ml should work?)

java.referenced:
pattern: org.springframework.boot.web.servlet.error.ErrorController
location: IMPLEMENTS_TYPE
description: ErrorController implementations may need updates
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm trying to find where this comes from, but can't find it in the guide...

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.

Create rule(s) for dependency review

2 participants

Comments