244.4. Samples

例如,您可以在 XML 中的 Message Filter 中使用 OGNL

<route>
  <from uri="seda:foo"/>
  <filter>
    <ognl>request.headers.foo == 'bar'</ognl>
    <to uri="seda:bar"/>
  </filter>
</route>

使用 Java DSL 的示例:

   from("seda:foo").filter().ognl("request.headers.foo == 'bar'").to("seda:bar");