我正在使用阿帕奇骆驼。我想创建类Items的Object(Items有一个Item列表)。
这是我的路线:
<route>
<from uri="mybatis:getAllItems?statementType=SelectList&?consumer.useIterator=false>
<to uri="bean:objectFactory?method=createItems"/>
<marshal>
<jaxb contextPath="com.domain"
encoding="utf-8" prettyPrint="true" />
</marshal>
<to uri="activemq:queue:items"/>
</route>
</camelContext>
我从item的数据库列表中获取并想要从中创建Items,我已经从xsd文件生成了我的类。我的问题是:“如何从列表而不是一个数据库对象创建对象”?
答案 0 :(得分:0)
mybatis URI中?
之后的附加问号 SelectList&
是该问题的错字吗?如果它确实在您的代码中,则应将其删除。
<from uri="mybatis:getAllItems?statementType=SelectList&consumer.useIterator=false>
除此之外,您的URI看起来不错,并且应该会产生一个列表。