THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
public class CustomGroovyShellFactory implements GroovyShellFactory {
GroovyShell createGroovyShell(Exchange exchange) {
ImportCustomizer importCustomizer = new ImportCustomizer()
importCustomizer.addStaticStars 'com.example.Utils'
CompilerConfiguration configuration = new CompilerConfiguration()
configuration.addCompilationCustomizers(importCustomizer)
return new GroovyShell(configuration)
}
} |
...Camel will use your custom GroovyShell instance (containing your custom static imports), instead of the default one.
...