Spring Batch: how to restart and rerun only skipped items

故事扮演 提交于 2021-02-05 07:10:03

问题


Can I restart job and process only skipped items after I have corrected the mistakes in file? I'm reading documentation and not finding currently this possibility. You can restart job if it is failed, but I'm thinking restarting job after it has been completed with some skipped items. If this cannot be achieved with configuration, what would be good way to implement it myself?


回答1:


What I have done in a case similiar to yours, is to log each skipped item in a file. Then I created a second job that load the file and process all logged items.



来源:https://stackoverflow.com/questions/15200752/spring-batch-how-to-restart-and-rerun-only-skipped-items

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!