Skip to content

Instantly share code, notes, and snippets.

@tkstone
Created April 26, 2019 02:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tkstone/759afe295f88670b9fd9871fba074075 to your computer and use it in GitHub Desktop.
<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