Spring Batch下一次运行从最后一页开始

时间:2018-04-11 15:52:08

标签: spring spring-boot spring-batch

我使用Spring Batch从两个不同的数据库移动数据,我希望在每次运行时,项目阅读器作业将从最新页面开始(我使用JpaPagingItemReader)。

有办法吗?

1 个答案:

答案 0 :(得分:0)

使用已处理的指示器标记​​模式,您可以将查询配置为仅拾取尚未处理的项目。您可以在Spring Batch文档中阅读有关此模式的更多信息:https://docs.spring.io/spring-batch/trunk/reference/html/readersAndWriters.html#process-indicator