I am trying to force my spring batch to write file always with CR-LF[EDIT] as line seperator irrespective of the underlying system.
I was trying to use setLineSeperator of FlatFileItemWriter
<bean id="myFileWriter" class="org.springframework.batch.item.file.FlatFileItemWriter">
<property name="lineSeparator">
<value>\r\n</value>
</property>
</bean>
But it always generates file with "\r\n" as string. I am not sure how to unescape this. I looked at the source code of FlatFileItemWriter, there it is just appending the line seperator. Also they are using System.getProperty("line.seperator") for getting default value.
I am sure I am missing something pretty simple.
Thanks.