How should I use .tasklet() / .chunk() to finish job succesfully?

后端 未结 1 842
自闭症患者
自闭症患者 2020-12-11 12:18

I use Spring Batch for cloning table from source to target database. The job is started manually from service layer using jobLauncher with passing parameters.

相关标签:
1条回答
  • 2020-12-11 12:48

    Using .chunk(new DefaultResultCompletionPolicy()) in step description is suitable for my case. This policy returns true from isComplete(RepeatContext context, RepeatStatus result) in case of null-result - than ResultSet is over.

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