THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="myCorrelationIdGenerator" class="com.mycompany.MyIdGenerator"/> |
Example using
...
Groovy
In this example we have an Exchange that has a User object stored in the in header. This User object has methods to get some user information. We want to use Groovy to inject an expression that extracts and concats the fullname of the user into the fullName parameter.
Code Block |
---|
public void doSomething(@Groovy("$request.in.header['familiyName'] $request.in.header['firstName']) String fullName, @Body String body) {
// process the inbound message here
}
|
Groovy supports GStrings that is like a template where we can insert $ placeholders that will be evaluated by Groovy.TODO: Or use OGNL or the like