Skip to content

Register Expression serializer on binder ObjectMapper#3190

Open
wadhwaroh-lang wants to merge 1 commit intospring-cloud:mainfrom
wadhwaroh-lang:fix/3175-expression-bindings-endpoint
Open

Register Expression serializer on binder ObjectMapper#3190
wadhwaroh-lang wants to merge 1 commit intospring-cloud:mainfrom
wadhwaroh-lang:fix/3175-expression-bindings-endpoint

Conversation

@wadhwaroh-lang
Copy link
Copy Markdown
Contributor

Fixes #3175.

Description

The bindings actuator endpoint can fail when binder extension properties contain SpEL Expression values, such as Rabbit routingKeyExpression or delayExpression.

AbstractMessageChannelBinder already defines an ExpressionSerializer, but the serializer module was created without being registered on the binder ObjectMapper. As a result, the endpoint could still try to serialize Expression internals 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

  • Added coverage for serializing an Expression through the binder ObjectMapper.
  • Ran ./mvnw -pl core/spring-cloud-stream -Dtest=AbstractMessageChannelBinderTests test.

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>
@wadhwaroh-lang wadhwaroh-lang force-pushed the fix/3175-expression-bindings-endpoint branch from e8ca83c to 75c7ac4 Compare April 26, 2026 20:45
@wadhwaroh-lang
Copy link
Copy Markdown
Contributor Author

hi @olegz Can you please help review?

@wadhwaroh-lang
Copy link
Copy Markdown
Contributor Author

The remaining Build and Verify failure appears unrelated to this change. The workflow fails during the Setup Maven step before tests run:
No valid download found for version 3.8.9
It looks like jvalkeal/setup-maven@v1 cannot find Maven 3.8.9 at https://dlcdn.apache.org/maven/maven-3/.

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.

Regression of actuator endpoint error if specified routingKeyExpression or delayExpression

1 participant