mapstruct List<Object1> to List<Object2> with different attributes
<p>I have to map List to List with different attribute names.</p>

<p>Ex:</p>

<pre><code>public class Object1 {
   private String name; 

   //getters and setters
}


public class Object2 {
  private String customerName; 

  //getters and setters
}
@Mapping(source="object1List.name" target="object2List.customerName"
List&lt;Object2&gt; toObject2(final List&lt;Object1&gt; object1List) 
</code></pre>

<p>I didn't write where I get Object1List to simplify. ( I get that in a different class in a method)</p>

<p>I have been trying this but mapstruct complains object1List is unknown property. Is there a way I can do this? Help is appreciated.</p>