I'm using apache camel. I want to create Object of class Items (Items has a list of Item).
This is my route:
<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>
I get from database list of item and want to create Items from it, I have generated my class from xsd file. And my question is: "How can I create Object from list instead of one database object"?
Is the additional question mark
?afterSelectList&in the mybatis URI a typo in the question? if it is really in your code you should remove it.Apart from that, your URI look good and it should produce a List.