...
You can refer to external script files instead of inlining the script. For example to load a groovy script from the classpath you need to prefix the value with resources resource: as shown:
Code Block | ||||
---|---|---|---|---|
| ||||
<route> <from uri="file://inbox"/> <script> <groovy>resources<groovy>resource:classpath:com/foo/myscript.groovy</groovy> </script> <beanRef ref="myServiceBean" method="processLine"/> </route> <bean id="myServiceBean" class="com.mycompany.MyServiceBean"/> |
...