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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -