Retry not working with Spring Batch with Java Config

前端 未结 2 1784
礼貌的吻别
礼貌的吻别 2021-01-21 12:56

I have Spring batch job with following config:

@Bean
public Job myJob(Step step1, Step step2, Step step3) {
    return jobs.get(\"myJob\").start(step1).next(step         


        
2条回答
  •  无人及你
    2021-01-21 13:46

    When MyReader class throws MyException it is stopping the execution of the job without retrying

    The retry policy is not applied to the item reader. So even if you declare an exception as retryable and that exception is thrown from the reader, the retry policy is not invoked.

    The retry policy is only applied to the processor and writer.

提交回复
热议问题