SpringSource/spring-batch — pull request #80 by dsyer (2012-12-10 16:08:43+00:00)
Title: BATCH-1918: First effort at @EnableBatchProcessing

Example:

@Configuration
public class RetrySampleConfiguration {

@Autowired
private JobBuilderFactory jobs;

@Autowired
private StepBuilderFactory steps;

@Bean
public Job retrySample() throws Exception {
return jobs.get("retrySample").start(step()).build();
}

@Bean
protected Step step() throws Exception {
return steps.get("step"). chunk(1).reader(reader()).writer(writer()).faultTolerant()
.retry(Exception.class).retryLimit(3).build();
}

@Bean
protected ItemReader reader() {
GeneratingTradeItemReader reader = new GeneratingTradeItemReader();
reader.setLimit(10);
return reader;
}

@Bean
protected ItemWriter