Spring batch: Retry job if does not complete in particular time

前端 未结 1 1061
陌清茗
陌清茗 2021-02-10 04:19

I am working on a Spring batch application where I have used RetryTemplate with SimpleRetryPolicy.

In this application, ItemProcessor

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-10 05:01

    You can define transactional-attributes to a given step. (https://docs.spring.io/spring-batch/trunk/reference/htmlsingle/#transactionAttributes)

    Transaction attributes can be used to control the isolation, propagation, and timeout settings.

    
      
          
          
      
    
    

    If you're using Java configuration check https://stackoverflow.com/a/23921558/1942642.

    0 讨论(0)
提交回复
热议问题