...
For example you could use the groovy function to create an Predicate in a Message Filter or as an Expression for a Recipient List
Dependency
You should add the camel-groovy dependeny when using Groovy language with Camel. The generic camel-script is not optimized for best Groovy experience, and hence you should add camel-groovy as dependency.
Customizing Groovy Shell
Sometimes you may need to use custom GroovyShell
instance in your Groovy expressions. To provide custom GroovyShell
, add implementation of the org.apache.camel.language.groovy.GroovyShellFactory
SPI interface to your Camel registry. For example after adding the following bean to your Spring context...
...