THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Notice that we must use ${ } placeholders in the expression now to let Camel be able to parse it correctly.
And this sample uses the date command to output current date.
Code Block | ||||
---|---|---|---|---|
| ||||
from("direct:hello").transform().simple("The today is ${date:now:yyyyMMdd} and its a great day.").to("mock:reply");
|
And in the sample below we invoke the bean language to invoke a method on a bean to be included in the returned string:
Code Block | ||||
---|---|---|---|---|
| ||||
from("direct:order").transform().simple("OrderId: ${bean:orderIdGenerator}").to("mock:reply");
|
Where orderIdGenerator
is the id of the bean registered in the Registry. If using Spring then its the Spring bean id.
Dependencies
The Bean language is part of camel-core.