315.4. 从外部资源加载脚本

可从 Camel 2.11 开始

您可以对脚本外部化,并让 Camel 从 "classpath:""file:""http:" 等资源加载它。
这通过以下语法完成: "resource:scheme:location",表示您可以执行的类路径中的文件:

.setHeader("myHeader").spel("resource:classpath:myspel.txt")