188.9. JSonPath injection

您可以使用 Bean 集成在 bean 上调用方法,并使用 JSonPath 等各种语言从消息中提取值并将其绑定到方法参数。

例如:

public class Foo {

    @Consume(uri = "activemq:queue:books.new")
    public void doSomething(@JsonPath("$.store.book[*].author") String author, @Body String json) {
      // process the inbound message here
    }
}