Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<bean id="ParameterSetter" class="test.reader.TestPartitionParameterSetter" scope="step">
<property name="startParam" value="#{stepExecutionContext['StartDay']}"/>
<property name="endParam" value="#{stepExecutionContext['EndDay']}"/>
</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
FROM TB_PARTITION_SOURCE
WHERE DAY_OF_WEEK BETWEEN ? AND ?"/>
<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