problem passing chunk size to MyBatis from Spring Batch

48 views
Skip to first unread message

Paul Krause

unread,
Apr 16, 2013, 11:24:51 AM4/16/13
to mybati...@googlegroups.com
I am trying to port my existing application from pure MyBatis (3.1.1) to MyBatis Spring (1.2.0) and Spring Batch (1.2.2)

Following the example from the documentation at http://mybatis.github.io/spring/batch.html I created an item reader bean modeled on dateBasedCriteriaReader. 
I used  ${batch.export.interactions.chunk.size} to set the pageSize property, following the documentation which says:
If the batch flow is configured with chunk size, it is relevant to pass this information to the reader as well, which is done via this property.
I get the following error:

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'bbTradeReader' defined in file [target\classes\META-INF\spring\batch\jobs\infinite-context.xml]: Could not resolve placeholder 'batch.export.interactions.chunk.size' in string value "${batch.export.interactions.chunk.size}"
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)

I cannot figure out where this placeholder would be defined, or any documentation on it.  Someone please explain.

Thanks,
Paul

Eduardo Macarron

unread,
Apr 16, 2013, 1:31:47 PM4/16/13
to mybatis-user
Hi Paul,

It looks like a doc error. There is not such
batch.export.interactions.chunk.size property in mybatis-spring code
so probably that is a copy & paste of the project that the contributor
of the doc was working on that probably had a custom .properties file
with that property defined.

So... use a literal instead. And, feel free to fix that (in github) or
add/remove/modify the docs as you consider.

regards,



2013/4/16 Paul Krause <paulkr...@alum.mit.edu>:
> --
> You received this message because you are subscribed to the Google Groups
> "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mybatis-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages