Spring batch output force CR-LF as line seperator -



Spring batch output force CR-LF as line seperator -

i trying forcefulness spring batch write file cr-lf[edit] line seperator irrespective of underlying system.

i trying utilize setlineseperator of flatfileitemwriter

<bean id="myfilewriter" class="org.springframework.batch.item.file.flatfileitemwriter"> <property name="lineseparator"> <value>\r\n</value> </property> </bean>

but generates file "\r\n" string. not sure how unescape this. looked @ source code of flatfileitemwriter, there appending line seperator. using system.getproperty("line.seperator") getting default value.

i sure missing pretty simple.

thanks.

it work with

<property name="lineseparator" value="&#13;&#10;" />

to insert cr xml, need utilize character entity &#13;, crlf need &#13;&#10;

got stackoverflow answer

for more background , proper writing (it's not cl-rf) see newline - difference between \n , \r

spring spring-batch

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -