Register Expression serializer on binder ObjectMapper#3190
Open
wadhwaroh-lang wants to merge 1 commit intospring-cloud:mainfrom
Open
Register Expression serializer on binder ObjectMapper#3190wadhwaroh-lang wants to merge 1 commit intospring-cloud:mainfrom
wadhwaroh-lang wants to merge 1 commit intospring-cloud:mainfrom
Conversation
Restore the intended Expression serializer registration so bindings actuator output can render SpEL expressions as strings instead of traversing Expression internals. Signed-off-by: wadhwaroh-lang <wadhwa.roh@gmail.com>
e8ca83c to
75c7ac4
Compare
Contributor
Author
|
hi @olegz Can you please help review? |
Contributor
Author
|
The remaining |
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.
Fixes #3175.
Description
The bindings actuator endpoint can fail when binder extension properties contain SpEL
Expressionvalues, such as RabbitroutingKeyExpressionordelayExpression.AbstractMessageChannelBinderalready defines anExpressionSerializer, but the serializer module was created without being registered on the binderObjectMapper. As a result, the endpoint could still try to serializeExpressioninternals and hit Jackson self-reference/cycle errors.This change registers the existing serializer module when rebuilding the binder
ObjectMapper, so SpEL expressions are rendered as their expression string.Verification
Expressionthrough the binderObjectMapper../mvnw -pl core/spring-cloud-stream -Dtest=AbstractMessageChannelBinderTests test.