Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<bean id="SourceMapper"
class="test.rowmapper.TbSourceMapper"/>
<bean id="ParameterSetter" class="test.reader.TestParameterSetter" scope="step">
<property name="param" value="#{jobParameters['param1']}"/>
</bean>
<bean id="TestReader"
class="org.springframework.batch.item.database.JdbcCursorItemReader"
scope="step">
<property name="dataSource" ref="testDataSource"/>
<property name="sql"
value="SELECT COL1, COL2, COL3
FROM TB_SOURCE
WHERE COL1 = ?"/>
<property name="rowMapper"
ref="SourceMapper"/>
<property name="preparedStatementSetter" ref="ParameterSetter"/>
<property name="fetchSize" value="100" />
<property name="maxRows" value="0" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment