-2

为什么我应该在 springbatch 的 FlatFileItemWriter 中使用 close 方法?否则文件日期不会被保留?

4

1 回答 1

0

Spring Batch will automatically call the open/update/close/write methods when you configure an item writer in a chunk oriented step.

So you don't need to call these lifecycle methods yourself unless you are using the item writer outside the scope of a step, in which case you need manually honour the contract implemented by the item writer (ItemWriter or ItemStreamWriter).

于 2018-09-24T15:46:52.647 回答