INTSAMPLES-34 Added sample for enriching a Map
This commit is contained in:
@@ -14,19 +14,19 @@ You can run the sample application by either
|
||||
- mvn package
|
||||
- mvn exec:java
|
||||
|
||||
This example illustrates the usage of the Content Enricher by covering 2 use-cases.
|
||||
Once the application is started, you can execute each individual use case by:
|
||||
|
||||
This example illustrates the usage of the Content Enricher.
|
||||
|
||||
Once the application has started, lease execute the various Content Enricher examples by
|
||||
|
||||
* entering 1 + Enter
|
||||
* entering 2 + Enter
|
||||
|
||||
Each use case will trigger slightly different Spring Integration message flows. For
|
||||
both flows a **User** object containing only the **username** is passed in through a *Gateway*.
|
||||
|
||||
However the Enrichment is executed differently for each flow:
|
||||
|
||||
* 1: In the *Enricher*, pass the full **User** object to the **request channel**.
|
||||
* 2: In the *Enricher*, pass only the **username** to the **request channel** by using the **request-payload-expression** attribute.
|
||||
* entering 3 + Enter
|
||||
|
||||
3 different message flows are triggered. For use-cases 1+2 a **User** object containing only the **username** is passed in. For use-case 3 a Map with the **username** key is passed in and enriched with the **User** object using the **user** key:
|
||||
|
||||
* 1: In the *Enricher*, pass the full **User** object to the **request channel**.
|
||||
* 2: In the *Enricher*, pass only the **username** to the **request channel** by using the **request-payload-expression** attribute.
|
||||
* 3: In the *Enricher*, pass only the username to the **request channel**, executing the same Service Activator as in **2**.
|
||||
|
||||
# Resources
|
||||
|
||||
|
||||
Reference in New Issue
Block a user