304.13. 从外部资源载入脚本
可从 Camel 2.11 开始
您可以对脚本进行外部化,并使 Camel 从资源(如 "classpath:"、"file:" 或 "http:" )加载。
这可通过以下语法完成: "resource:scheme:location",例如参考类路径上的文件,您可以执行以下操作:
.setHeader("myHeader").simple("resource:classpath:mysimple.txt")
.setHeader("myHeader").simple("resource:classpath:mysimple.txt")