需要将“[100,200]”之类的字符串反序列化为Integer数组,以便以后使用:
<to uri="class:java.awt.Robot?method=mouseMove&multiParameterArray=true"/>
multiParameterArray = true 是一个关键。
<unmarshal ref="json"/>
带
<dataFormats>
<json id="json" library="Jackson" allowJmsType="true"/>
</dataFormats>
卡住了。在受限制的环境中工作,无法创建执行这些东西的自定义bean。需要一些标准的驼峰方式。
更新1
似乎这个结构完全符合我的需要。但我最好使用<unmarshal/>
而不是
<setBody>
<constant>[100,200]</constant>
</setBody>
<setBody>
<jsonpath>$.*</jsonpath>
</setBody>