[英]Spring batch composite item Writers with optional database writes
I have spring batch job which perform following steps我有执行以下步骤的弹簧批处理作业
Now the issue is this composite item writer fail if any of jdbc item writer don't update row due to condition is not matched or to be skipped.现在的问题是,如果任何 jdbc 项目写入器由于条件不匹配或被跳过而未更新行,则此复合项目写入器将失败。
Use case is用例是
The idea of wrapping each chunk in a transaction is to be able to process the whole chunk of items as a unit: either all items are committed or none of them is committed (all or nothing semantics).将每个块包装在事务中的想法是能够将整个项目块作为一个单元进行处理:要么提交所有项目,要么不提交任何项目(全有或全无语义)。
Some Writers needs to update and some needs to be skipped- need help to resolve this.
有些 Writer 需要更新,有些需要跳过 - 需要帮助来解决这个问题。
If you need fine grained control like that, you need to create a custom writer.如果您需要这样的细粒度控制,则需要创建自定义编写器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.