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=" " />
to insert cr xml, need utilize character entity
, crlf need
got stackoverflow answer
for more background , proper writing (it's not cl-rf) see newline - difference between \n , \r
spring spring-batch
Comments
Post a Comment