title: Autowiring list of components in spring 4
body: <p>I'm trying to autowire list of interfaces this way:</p>
  
  <pre><code>@Autowired
  private List&lt;SomeInterface&lt;SomeAbstractClass&gt;&gt; list;
  </code></pre>
  
  <p>This is my interface and abstract class:</p>
  
  <pre><code>public interface SomeInterface&lt;T extends SomeAbstractClass&gt; 
  
  public abstract class SomeAbstractClass implements Serializable 
  </code></pre>
  
  <p>Those are my components (they should end up in the list):</p>
  
  <pre><code>@Component("componentA")
  public class ImplementationA implements SomeAbstractClass&lt;ClassAImpementingSomeAbstractClass&gt; 
  
  @Component("componentB")
  public class ImplementationB implements SomeAbstractClass&lt;ClassBImpementingSomeAbstractClass&gt; 
  </code></pre>
  
  <p>And the implementation of abstract class are definied like this:</p>
  
  <pre><code> public class ClassAImpementingSomeAbstractClass extends SomeAbstractClass
   public class ClassBImpementingSomeAbstractClass extends SomeAbstractClass
  </code></pre>
  
  <p>The problem occured after migrating from spring 3.2.5 to 4.3.11.
  In spring 3 I'm corecctly getting list that have ImplementationA and ImplementationB. 
  After moving to spring 4 I'm getting exception during deployment:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.NoSuchBeanDefinitionException: No
    qualifying bean of type
    'java.util.List&lt;SomeInterface&lt;SomeAbstractClass>>' available: expected
    at least 1 bean which qualifies as autowire candidate. Dependency
    annotations:
    {@org.springframework.beans.factory.annotation.Autowired(required=true)}</p>
  </blockquote>
  
  <p>The question is why spring is trying to find bean of typ List? Shouldn't it be trying to find all beans of type SomeInterface and add them to the list (exaclty what I've got on spring 3)?</p>
  
  <p>Thanks for any suggestions!</p>