Repository navigation
CN 243 & CN 219 Spring Boot 3.5.16 to 4.1.1 on Java 21 (Java 25 ready) - #31
Merged
ravindra-tummuru merged 14 commits intoSep 17, 2026
Conversation
…ration changes necessary for technology only migration. No logic changes.
…processor-and-case-api-to-spring-boot-v4
1 task
ryangrundy7
reviewed
Sep 8, 2026
…processor-and-case-api-to-spring-boot-v4
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
…mantic versioning as advised by the reviews.
ryangrundy7
reviewed
Sep 9, 2026
ryangrundy7
reviewed
Sep 9, 2026
…ted by the review.
ryangrundy7
reviewed
Sep 9, 2026
ryangrundy7
reviewed
Sep 9, 2026
- Import the legacy Spring RetryListener and keep the core retry listener fully qualified to avoid the type-name collision. - Also add an inline comment explaining that this class intentionally bridges migrated runtime retry wiring and legacy @retryable listener usage, with no behavioural change.
ryangrundy7
approved these changes
Sep 10, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical mapper and Logback findings, plus a moderate retry-listener compatibility issue, must be addressed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request upgrades the Case Processor from Spring Boot 3.5.16 to 4.1.1 with Jackson 3, updated Spring Cloud dependencies, and Java 21 compatibility.
Changes:
- Updates framework, dependency, and build-tool versions.
- Migrates JSON handling and retry APIs.
- Updates logging and Jackson compatibility configuration.
- Adjusts tests for Boot 4 APIs.
File summaries
| File | Reviewed changes | Findings |
|---|---|---|
src/test/java/uk/gov/ons/census/caseprocessor/testutils/PubsubHelper.java |
Updates test JSON and HTTP APIs. | No final comment. |
src/test/java/uk/gov/ons/census/caseprocessor/testutils/JsonHelper.java |
Migrates test JSON handling to Jackson 3. | No final comment. |
src/test/java/uk/gov/ons/census/caseprocessor/messaging/ManagedMessageRecovererTest.java |
Adds retry-exception recovery coverage. | No final comment. |
src/test/java/uk/gov/ons/census/caseprocessor/messaging/FulfilmentRequestReceiverTest.java |
Updates Jackson 3 test handling. | No final comment. |
src/test/java/uk/gov/ons/census/caseprocessor/messaging/FulfilmentRequestReceiverIT.java |
Updates Jackson 3 integration-test handling. | No final comment. |
src/main/resources/logback-spring.xml |
Updates logging configuration. | Critical: The DOCTYPE does not match the configuration root and may prevent startup. |
src/main/resources/application.yml |
Adds Jackson compatibility configuration. | No final comment. |
src/main/java/uk/gov/ons/census/caseprocessor/utils/RedactHelper.java |
Migrates Jackson exception and mapper types. | No final comment. |
src/main/java/uk/gov/ons/census/caseprocessor/utils/ObjectMapperFactory.java |
Creates the Jackson 3 mapper. | Critical: The mapper does not apply the configured compatibility defaults, risking changed wire-format output. |
src/main/java/uk/gov/ons/census/caseprocessor/utils/JsonHelper.java |
Migrates JSON serialization and exception handling. | No final comment. |
src/main/java/uk/gov/ons/census/caseprocessor/messaging/ManagedMessageRecoverer.java |
Supports updated retry recovery callbacks. | No final comment. |
src/main/java/uk/gov/ons/census/caseprocessor/config/MessageConsumerConfig.java |
Uses the Spring Core retry listener API. | No final comment. |
src/main/java/uk/gov/ons/census/caseprocessor/config/DefaultListenerSupport.java |
Bridges retry listener contracts. | Moderate: Core retry callback signatures are not implemented, making the bridge ineffective. |
src/main/java/uk/gov/ons/census/caseprocessor/Application.java |
Updates the relocated EntityScan import. |
No final comment. |
pom.xml |
Updates platform, dependency, and build-plugin versions. | No final comment. |
Review details
Suppressed comments (1)
src/main/java/uk/gov/ons/census/caseprocessor/config/DefaultListenerSupport.java:10
- This class is declared as a bridge for both retry APIs, but its overridden methods still use
org.springframework.retry.RetryContextandRetryCallback. The bean is registered asorg.springframework.core.retry.RetryListener, whose callbacks use the Spring Core retry types, so the new runtime will call its default methods rather than these overloads; the bridge is therefore ineffective. Implement the Core retry callback signatures separately, retaining the legacy overloads only if@Retryablesupport is still required.
/* Bridge both listener contracts so one bean supports migrated runtime wiring and legacy @Retryable
listeners. */
public class DefaultListenerSupport
implements org.springframework.core.retry.RetryListener, RetryListener {
- Files reviewed: 14/15 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…new operator initialization.
…at directly guard the Jackson 3 compatibility contracts and additional tests on retry functionality as per the review comments.
sumeetons
approved these changes
Sep 17, 2026
…vocations using: - MESSAGE_TOTAL_ATTEMPTS = 3 - maxRetries(MESSAGE_TOTAL_ATTEMPTS - 1) - This preserves the pre-migration runtime behavior.
ryangrundy7
approved these changes
Sep 17, 2026
ryangrundy7
approved these changes
Sep 17, 2026
ravindra-tummuru
deleted the
CN-219-spike-investigate-upgrading-the-case-processor-and-case-api-to-spring-boot-v4
branch
September 17, 2026 15:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation and Context
Spring Boot 3.5 left OSS support on 30 June 2026. 3.5.16 is its final free patch release - there are no further community security fixes for Boot 3.5, Spring Framework 6.2, Hibernate 6.6 or the Jackson 2 line as shipped in that BOM. Staying put means running the 2027 test event, and then the census run-up, on an unsupported framework stack.
The spike that preceded this ticket set out to assess the upgrade for the Case Processor and Case API. Its conclusion was that the upgrade is not optional and not deferrable, that it reaches further than those two services, and that the shared libraries, and DDL generator have to move first because everything else compiles against them.
What has changed
Updated census-rm-caseprocessor pom.xml:
Follow-up tasks to include in existing ticket post migration to address below issues/observations
Remove spring.jackson.use-jackson2-defaults estate-wide, as one announced contract change. Coordinated with integration teams, H2 2027.
Clear the Error Prone 2.50 / PMD 7.26 warning backlog as necessary.
No refactoring. Follow-up task/ticket as above possible breaking change to integration team.
No behaviour or functionality changed. A technology-only migration of seven repositories including this shared library from Spring Boot 3.5.16 to 4.1.1 on a pinned Java 21 baseline, with every repository ready for Java 25 migration.
No functional change/s so no new tests.
How to test?
Run
make buildin this repositoryRun
make testin acceptance tests repositoryLinks
https://officefornationalstatistics.atlassian.net/browse/CN-243
https://officefornationalstatistics.atlassian.net/browse/CN-219
https://officefornationalstatistics.atlassian.net/wiki/x/eYFcGg
Screenshots (if appropriate):