80.14. 从外部资源载入脚本
您可以对脚本进行外部化,并让 Camel 从资源(如 "classpath:"、"file:" 或 "http:" )加载它。这可以通过以下语法完成:" resource:scheme:location",例如引用您可以进行的类路径上的文件:
.setHeader("myHeader").xpath("resource:classpath:myxpath.txt", String.class)
.setHeader("myHeader").xpath("resource:classpath:myxpath.txt", String.class)