April 2012
Beginner
96 pages
2h 26m
English
Spring Integration endpoints support Spring Expression Language
(SpEL) definitions. You can use the expressions to evaluate the properties
on headers and payloads. For example, if you wish to extract a
header property using the expression, the following
snippet will help:
<int:header-enricher id="enricher"
input-channel="in-channel" output-channel="out-channel">
<int:header name="TARGET_SYSTEM" expression="headers.TARGET_SYSTEM"/>
</int:header-enricher>The headers property will have
the reference to MessageHeaders, so you
can query the properties using headers.property_name syntax.
Similarly, the payload is available as the payload property, so you can query the
payload object’s variable by using dot notation:
<int:enricher input-channel="in-channel"
request-channel="enricher-req-channel"
output-channel="stdout">
<int:property name="price"
expression="payload.price"/>
</int:enricher>Endpoints such as Transformers, Filters, Service Activators, and Splitters support the Spring Expressions.
Read now
Unlock full access