THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
from("seda:foo").filter().ognl("request.headers.foo == 'bar'").to("seda:bar"); |
Loading script from external resource
Available as of Camel 2.11
You can externalize the script and have Camel load it from a resource such as "classpath:"
, "file:"
, or "http:"
.
This is done using the following syntax: "resource:scheme:location"
, eg to refer to a file on the classpath you can do:
Code Block |
---|
.setHeader("myHeader").groovy("resource:classpath:myognl.txt")
|
Dependencies
To use OGNL in your camel routes you need to add the a dependency on camel-ognl which implements the OGNL language.
...