Files
spring-integration-samples/basic/enricher
Gunnar Hillert 85bef285d4 INTSAMPLES-47 - Upgrade SI dep. to 2.1.0.RELEASE
* Upgraded all Spring Integration dependencies to 2.1.0.RELEASE
* All Samples use the new Artifactory-based Milestone Repository http://repo.springsource.org/milestone (As the repositories are additive, this repository will also include the release repo)
* Added versions to all Maven plugin declarations, reducing the amount WARNING-level logging substantially
2012-01-07 22:58:10 -05:00
..

Spring Integration - Enricher Sample

Overview

This sample demonstrates how the Enricher components can be used.

Getting Started

You can run the sample application by either

  • running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application)
  • or from the command line execute:
    • mvn package
    • mvn exec:java

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
  • 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

For help please take a look at the Spring Integration documentation:

http://www.springsource.org/spring-integration