Preserve DefaultMessageListenerContainer startup behaviour - #1119
Open
Kyran121 wants to merge 2 commits into
Open
Preserve DefaultMessageListenerContainer startup behaviour#1119Kyran121 wants to merge 2 commits into
Kyran121 wants to merge 2 commits into
Conversation
Contributor
Author
|
@timtebeek - ready to review |
Kyran121
marked this pull request as draft
August 8, 2026 11:00
Kyran121
force-pushed
the
preserve-mongo-listener-container-startup
branch
6 times, most recently
from
August 8, 2026 13:07
e63de48 to
ef6240a
Compare
Kyran121
marked this pull request as ready for review
August 11, 2026 15:59
Kyran121
force-pushed
the
preserve-mongo-listener-container-startup
branch
from
August 12, 2026 18:14
5fa7316 to
d843089
Compare
3 tasks
…Data MongoDB 5.0 Spring Data MongoDB 5 flips DefaultMessageListenerContainer's autoStartup default from false to true. Add a recipe that finds Spring-managed @bean methods returning the container without explicit startup configuration and inserts setAutoStartup(false) to preserve the previous behaviour, handling multiple return paths, locally-declared and directly-returned containers, and same-class helper methods, while leaving already- configured or non-Spring-managed containers untouched and flagging cases too indirect to update with confidence. Wire it into the UpgradeSpringDataMongoDb_5_0 composite recipe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Kyran121
force-pushed
the
preserve-mongo-listener-container-startup
branch
3 times, most recently
from
August 19, 2026 14:55
aced5da to
63d8c90
Compare
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.
What changed
org.openrewrite.java.spring.data.PreserveMongoListenerContainerAutoStartup.UpgradeSpringDataMongoDb_5_0.DefaultMessageListenerContainerreturn path independently.setAutoStartup(...)configuration unchanged.JavaType.Variableidentity so same-named variables in separate scopes are handled independently.Detection boundaries
The recipe deliberately stops short of general interprocedural analysis. A same-class helper is followed one hop only when its returned container is directly constructed or held in a directly-constructed local variable. Explicit startup configuration in that helper is respected. Anything beyond that boundary is left unchanged and marked for manual review.
Tests
Coverage includes:
Validation
The focused recipe test suite has been expanded around the per-return provenance model. The PR remains draft while CI validates the updated implementation.