title: spring framework : expected single matching bean but found 2
body: <p>This super class DAO:</p>
  
  <pre><code>public class CrudDAO{
  
  }
  </code></pre>
  
  <p>This child class:</p>
  
  <pre><code>@Repository
  public class JnsTimeDao extends CrudDAO {
  
  }
  
  @Repository
  public class BatchDAO extends CrudDAO {
  }
  </code></pre>
  
  <p>this super service class</p>
  
  <pre><code>@Transactional(readOnly = true)
  public abstract class CrudService&lt;D extends CrudDAO&gt; {
  
      @Autowired
      protected D dao;
  }
  </code></pre>
  
  <p>startup error:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.NoUniqueBeanDefinitionException: No
    qualifying bean of type [com.gp.dao.CrudDAO] is defined: expected
    single matching bean but found 2: batchDAO,jnsTimeDao</p>
  </blockquote>