spring-projects / spring-projects/spring-integration-samples
Payload Enricher with request-payload-expression="payload.username"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
While trying out the enricher example by using Java DSL, I am unable to replace the payload that contains User object with only username field using the method:
.enrich(p -> p.requestPayloadExpression("payload.username"))
--> https://docs.spring.io/spring-integration/reference/html/content-enrichment.html#payload-enricher
However, the payload functionality works when I use the transform method that takes in an expression parameter
.transform("payload.username")
Is the transform method the only way to update the payload?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java DSL calls shown in the issue: enrich with requestPayloadExpression("payload.username") and transform("payload.username"). Read the linked payload-enricher documentation and compare the two expression entry points using the enricher example. Done means determining whether the enricher is expected to replace the payload and documenting or reproducing the correct behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100