Retry not working when Spring Batch managed transaction rolls back
问题 In one of the steps of my Spring Batch job, I'm trying to configure it so that when ObjectOptimisticLockingFailureException happens, the step can be retried and hopefully the retry will work. @Bean public Step myStep(StaxEventItemReader<Response> staxEventResponseReader, ItemWriter<Response> itemWriter, ItemProcessor<? super Response, ? extends Response> responseProcessor) { return stepBuilderFactory.get("myStep") .<Response, Response>chunk(1) .reader(staxEventResponseReader) .processor