THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<route> <from uri="direct:start"/> <choice> <when> <jsonpath>$.store.book[?(@.price < ${header.cheap})]</jsonpath> <to uri="mock:cheap"/> </when> <when> <jsonpath>$.store.book[?(@.price < ${header.average})]</jsonpath> <to uri="mock:average"/> </when> <otherwise> <to uri="mock:expensive"/> </otherwise> </choice> </route> |
You can turn off support for inlined simple expression by setting the option allowSimple
to false
as shown:
Code Block |
---|
// java dsl
.when().jsonpath("$.store.book[?(@.price < 10)]", false, false)
// xml dsl
<jsonpath allowSimple="false">$.store.book[?(@.price < 10)]</jsonpath> |
JSonPath injection
You can use Bean Integration to invoke a method on a bean and use various languages such as JSonPath to extract a value from the message and bind it to a method parameter.
...