7

Click here to load reader

Spring Integration (Part 4) - Transformers

Embed Size (px)

DESCRIPTION

We continue our exploration of Spring Integration (SI) message endpoints today with a look at transformers. Transformers take a message from a channel and creates a new message containing converted payload or message structure. This allows the provider of information and the consumer of information to communicate via SI without having to settle on a common format. XML can be transformed to JSON, JSON transformed to Java objects, etc.

Citation preview

Page 1: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

Page 2: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

Page 3: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

Page 4: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

Page 5: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

<int:object-to-string-transformer input-channel="inboundChannel" output-channel="outboundChannel“ />

<int:transformer input-channel="inboundChannel"output-channel="outboundChannel" expression="payload.toUpperCase()"/>

Page 6: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

Page 7: Spring Integration (Part 4) - Transformers

Copyright © 2014 by Intertech, Inc.

http://bit.ly/1hyrViM

Click here for associated labs and video