47 lines
1.9 KiB
XML
47 lines
1.9 KiB
XML
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:batch="http://www.springframework.org/schema/batch"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/batch
|
|
http://www.springframework.org/schema/batch/spring-batch-3.0.xsd
|
|
http://www.springframework.org/schema/beans
|
|
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
|
|
|
|
<bean class="org.springframework.batch.test.JobLauncherTestUtils"/>
|
|
|
|
<bean id="jobRepository"
|
|
class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean">
|
|
<property name="transactionManager" ref="transactionManager"/>
|
|
</bean>
|
|
|
|
<bean id="transactionManager"
|
|
class="org.springframework.batch.support.transaction.ResourcelessTransactionManager"/>
|
|
|
|
<bean id="jobLauncher"
|
|
class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
|
|
<property name="jobRepository" ref="jobRepository"/>
|
|
</bean>
|
|
|
|
<bean id="linesReader" class="org.baeldung.taskletsvschunks.tasklets.LinesReader"/>
|
|
|
|
<bean id="linesProcessor" class="org.baeldung.taskletsvschunks.tasklets.LinesProcessor"/>
|
|
|
|
<bean id="linesWriter" class="org.baeldung.taskletsvschunks.tasklets.LinesWriter"/>
|
|
|
|
<batch:job id="taskletsJob">
|
|
<batch:step id="readLines">
|
|
<batch:tasklet ref="linesReader"/>
|
|
<batch:end on="FAILED"/>
|
|
<batch:next on="*" to="processLines"/>
|
|
</batch:step>
|
|
<batch:step id="processLines">
|
|
<batch:tasklet ref="linesProcessor"/>
|
|
<batch:end on="FAILED"/>
|
|
<batch:next on="*" to="writeLines"/>
|
|
</batch:step>
|
|
<batch:step id="writeLines">
|
|
<batch:tasklet ref="linesWriter"/>
|
|
<batch:end on="FAILED"/>
|
|
<batch:end on="COMPLETED"/>
|
|
</batch:step>
|
|
</batch:job>
|
|
|
|
</beans> |