Announcement Announcement Module
Collapse
No announcement yet.
LineSeperators Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LineSeperators

    How to set the lineSeperators in an FlatFileItemWriter .

    Code:
    <bean id="ypgadjustmentWriter" class="org.springframework.batch.item.file.FlatFileItemWriter">
    	 	<property name="resource" value="file:${YPGPaymentWorkDirectory}" />
    	 	<property name="lineAggregator">
    			<bean class="org.springframework.batch.item.file.transform.FormatterLineAggregator">
        			<property name="fieldExtractor">
            			<bean class="org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor">
    				        <property name="names" value="RecordTypeCode....." />
            			</bean>
        			</property>
        			<property name="format" value="%-1s%-..." />
    			</bean>
    		</property> 
    		<property name="lineSeparator" value="\\r\\n"/>
      	</bean>
    Here I want to set the lineSeperators as "\r\n" (i.e windows default lineseperator )
    If I specific as "\\r\\n" , framework considers as a charater with 6 character word ('\','\','r','\','\','n') .

    How to specfic escape sequences as line seperators for flatItemReaders...

  • #2
    The googles found me: http://forum.springsource.org/archiv...p/t-19108.html

    have you tried XML escape codes? Maybe &#xD;&#xA;

    Comment

    Working...
    X