Spring Batch: How can i set record separator policy in FlatFileItemWriter?

448 views Asked by At

I need to write record with the same reading format. Example:

aaa;bbb;ccc;dd
dd;zzz

What I need is to attach the record with double quotes:

aaa;bbb;ccc;"dd
dd";zzz

How can i do it? In FlatFileItemReader there is the option to use RecordSeparatorPolicy which does, but in FlatFileItemWriter???

1

There are 1 answers

1
Mahmoud Ben Hassine On BEST ANSWER

There is no equivalent to RecordSeparatorPolicy on the writer side. You need a custom LineAggregator for this use case.