I configure a step in XML like this:
@Configuration
@EnableBatchProcessing
@Import(DataConfig.class)
public class SpringBatchConfig {
..................
..................
@Autowired
private StepBuilderFactory stepBuilders;
@Bean
public Step loadSlaveStep()
return stepBuilders.get("slaveStep")()
.chunk()
.faultTolerant()
.skip(MyException.class)
.skipLimit(100000)
.build()
}
You need to build up a FaultTolerantStepBuilder
using StepBuilder.faultTolerant
method.
return stepBuilder()
.chunk()
.faultTolerant()
.skip(MyException.class)
.skipLimit(100000)
.build()