In your case, the configuration will look like this:
Spring Package 2.x
<bean id="stepParent" class="org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean" abstract="true"> <property name="backOffPolicy"> <bean class="org.springframework.batch.retry.backoff.FixedBackOffPolicy" <property name="backOffPeriod" value="2000" /> </bean> </property> </bean> <batch:job id="importDataJob" job-repository="jobRepository"> <batch:step id="importDataStep" parent="stepParent"> ... </batch:step> </batch:job>
Unfortunately, the batch
namespace does not support setting backOffPolicy
directly on step
, see BATCH-1441 .
Spring Package 3.0
In Spring Batch 3.0, some classes have moved to other packages. This is a fragment of the configuration:
<bean id="stepParent" class="org.springframework.batch.core.step.factory.FaultTolerantStepFactoryBean" abstract="true"> <property name="backOffPolicy"> <bean class="org.springframework.retry.backoff.FixedBackOffPolicy"> <property name="backOffPeriod" value="2000"/> </bean> </property> </bean>
dma_k source share