263.13. 使用 Simple 语言的示例

简单 语言现在支持使用属性占位符,例如在以下路由中使用:

// properties
cheese.quote=Camel rocks

// route
from("direct:start")
    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");

您还可以在 Simple 语言中指定位置,例如:

// bar.properties
bar.quote=Beer tastes good

// route
from("direct:start")
    .transform().simple("Hi ${body}. ${properties:com/mycompany/bar.properties:bar.quote}.");