私は春のバッチでcsv変換に取り組んでいます。パイプで区切られたテキストファイルを使用しています。私の問題は、CSVに書き込もうとしたときにフィールドに遭遇すると新しいフィールドがcsv私はインドのムンバイのような住所を持っていますか?テキストファイルでは、ムンバイとインドの2つのフィールド、つまりCSVファイルのインドを作成する代わりに、インドのムンバイを1つのフィールドとして書き込む必要があります。春バッチCSV変換
CSV ItemWriter
<bean id="ABCWriters" class="org.springframework.batch.item.file.FlatFileItemWriter">
<property name="resource" value="file:output/ABC.csv"></property>
<property name="shouldDeleteIfExists" value="true"></property>
<property name="lineAggregator">
<bean class="org.springframework.batch.item.file.transform.DelimitedLineAggregator">
<property name="delimiter" value=","></property>
<property name="fieldExtractor">
<bean class="org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor">
<property name="names" value="address, city" />
</bean>
</property>
</bean>
</property>
</bean>
良い説明、ありがとう –