Announcement Announcement Module
Collapse
No announcement yet.
Example for JdbcPagingItemReader Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example for JdbcPagingItemReader

    Hi,
    I want to use JdbcPagingItemReader to read from db.
    can i get example for it..

    Thanks in advance..

  • #2
    If you are just looking for an example of how to configure it:

    Code:
    	<bean id="jdbcPagingItemReader" class="org.springframework.batch.item.database.JdbcPagingItemReader">
    		<property name="dataSource" ref="dataSource"/>
    		<property name="pageSize" value="1000"/>
    		<property name="fetchSize" value="100"/>
            <property name="queryProvider">
            	<bean class="org.springframework.batch.item.database.support.HsqlPagingQueryProvider">
            		<property name="selectClause" value="select id, bar"/>
            		<property name="fromClause" value="foo"/>
            		<property name="sortKeys">
            			<map>
            				<entry key="id" value="ASCENDING"/>
            				<entry key="name" value="DESCENDING"/>
            			</map>
            		</property>
            	</bean>
            </property>
    	</bean>
    That configuration is from the JdbcPagingItemReaderConfigTest-context.xml file in the spring-batch-infrastructure project.

    Comment


    • #3
      Thanks a lot minella

      Comment

      Working...
      X