title: Spring Batch FlatFileItemWriter write Object with List
body: <p>I have a Pojo Partner: 
  Partner Id
  List</p>
  
  <p>Address Pojo : 
  AddressId,
  Address,
  City,
  Country,
  Pin</p>
  
  <p>I want to create a Flat file in Spring Batch
  - File will be 
  : PartnerId;AddressId;Address;City;Country;Pin</p>
  
  <p>I am getting Partner Pojo with Id and List of Addresses</p>
  
  <p>How can I use the FlatFileItemWriter with the PartnerPojo
  My FlatFileItemWriterConfiguration configuration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;bean id="itemWriter" class="org.springframework.batch.item.file.FlatFileItemWriter"&gt;
     &lt;property name="resource" value="file:outputFile.txt" /&gt;
     &lt;property name="lineAggregator"&gt;
        &lt;bean class="org.springframework.batch.item.file.transform.DelimitedLineAggregator"&gt;
           &lt;property name="delimiter" value=";" /&gt;
           &lt;property name="fieldExtractor"&gt;
              &lt;bean class="org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor"&gt;
                 &lt;property name="names" value="partnerId, addressId, address,city,country,pin " /&gt;
              &lt;/bean&gt;
           &lt;/property&gt;
        &lt;/bean&gt;
     &lt;/property&gt;
     &lt;property name="headerCallback" ref="headerCallback" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I get an error on addressId</p>