spring - How can i make my Spring Batch job to restart from a specific value in the database column?
问题描述
I have a spring batch job that reads a database table and updates it with a chunk size of 5.
select * from table where col1 is null;
The batch job updates the column 'col1' sometimes and sometimes not based on business rules.
If the job fails, it is not restarting from where it left off. It skips some of the chunks as the query "select * from table where col1 is null;" will return a new result set as the previous run updated some of the col1 values.
Now instead of using the default execution context state for restart, can i use a specific value of Col1 say 50, and make the restart run all the records with col1 > 50 ?
解决方案
推荐阅读
- google-sheets - Google 表格根据不同列中的条件计算唯一日期
- javascript - Netlify 功能:GitHub API 代理请求失败,错误解码 lambda 响应:json
- angular - Firebase 可调用函数检查数据参数的类型
- object - PHPUnit 存根来自另一个类的方法调用
- cassandra - Cassandra 4.0 节点无法重启
- java - 为什么java后台进程慢?
- html - 如何从 vue 站点中删除边距
- python - 将日期转换为 datetime64 会导致日期和月份的位置被交换
- android - GoogleMap.CancelableCallback() onFinish() 在动画结束前被调用
- java - 在 Spring 中安装新软件