32.10. 使用带有原生查询的消费者
对于仅使用所选实体,您可以使用 nativeQuery
URI 查询选项。您只需要定义原生查询选项:
from("jpa://org.apache.camel.examples.MultiSteps?nativeQuery=select * from MultiSteps where step = 1") .to("bean:myBusinessLogic");
from("jpa://org.apache.camel.examples.MultiSteps?nativeQuery=select * from MultiSteps where step = 1")
.to("bean:myBusinessLogic");
如果使用 native 查询选项,您将收到消息正文中的对象数组。