title: Injection of autowired dependencies failed for abstract class
body: <p>I am using Spring 3 and Hibernate 4</p>
  
  <p>I have the following class structure </p>
  
  <pre><code>public interface GenericDAO&lt;T&gt; {
  
      public void create(T entity);
      public void update(T entity);
      public void delete(T entity);
  }
  </code></pre>
  
  <p><strong>DAO class</strong></p>
  
  <pre><code>public interface EmployeeDAO extends GenericDAO&lt;Employee&gt;  {
  
      public void findEmployee(EmployeeQueryData data);
  }
  </code></pre>
  
  <p><strong>DAO Implementation class</strong></p>
  
  <pre><code>@Repository("employeeDAO")
  public abstract class EmployeeDAOImpl implements EmployeeDAO {
  
  protected EntityManager entityManager;
  
  @Override
  public void findEmployee(EmployeeQueryData data) {
  
  ...... code
  
  }
  </code></pre>
  
  <p>The problem I am facing is when I try to deploy, I am getting the following exception.
  If I remove <code>abstract</code> from <code>EmployeeDAOImpl</code> and remove <code>extends GenericDAO&lt;Employee&gt;</code> from <code>EmployeeDAO</code> then application gets deployed without errors. So it is not possible to have <code>abstract</code> class for <code>EmployeeDAOImpl</code> or I have need to implement all methods of <code>GenericDAO</code> in DAO implementation without <code>abstract</code>?</p>
  
  <pre><code>Error creating bean with 
  name 'employeeService': Injection of autowired dependencies failed; \
  nested exception is org.springframework.beans.factory.BeanCreationException:
  Could not autowire field: test.dao.EmployeeDAO 
  test.service.EmployeeServiceImpl.employeeDAO; nested exception is
  org.springframework.beans.factory.NoSuchBeanDefinitionException: 
  No matching bean of type [test.dao.EmployeeDAO] found for dependency: 
  expected at least 1 bean which qualifies as autowire candidate for 
  this dependency. Dependency annotations: 
  {@javax.inject.Inject()}.
  </code></pre>
  
  <p><strong>Edit 1</strong></p>
  
  <p><strong>GenericDAOImpl</strong></p>
  
  <pre><code>public class GenericDAOImpl&lt;T&gt; implements GenericDAO&lt;T&gt; {    
  
      public void create(T entity) {
      }       
      public void update(T entity) {
      }
      public void delete(T entity) {
      }
  </code></pre>
  
  <p><strong>EmployeeDAOImpl</strong> </p>
  
  <pre><code>public class EmployeeDAOImpl extends GenericDAOImpl&lt;Employee&gt; implements EmployeeDAO {
  </code></pre>