Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<batch:job id="TestPartitionJob" job-repository="jobRepository">
<batch:step id="TestPartitionStep">
<batch:partition step="SingleStep" partitioner="DayOfWeekPartitioner">
<batch:handler grid-size="7" task-executor="TaskExecutor" />
</batch:partition>
</batch:step>
</batch:job>
<bean id="DayOfWeekPartitioner"
class="test.reader.DayOfWeekPartitioner"
scope="step">
</bean>
<bean id="TaskExecutor"
class="org.springframework.core.task.SimpleAsyncTaskExecutor"
scope="step">
<constructor-arg type="java.lang.String" value="test-executor"/>
<property name="concurrencyLimit" value="20"/>
</bean>
<batch:step id="SingleStep">
<batch:tasklet transaction-manager="testTransactionManager" allow-start-if-complete="true">
<batch:chunk
reader="TestReader"
processor="TestProcessor"
writer="TestWriter"
commit-interval="1"
reader-transactional-queue="false"
/>
</batch:tasklet>
</batch:step>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment