title: Class doesn't contain matching constructor for autowiring
body: <p>I have two classes</p>
  
  <pre><code>public abstract class AbstractDAO&lt;T&gt; {
      private final MyExecutor&lt;T&gt; myExecutor;
      private final Class&lt;T&gt; clazz;
  
      public AbstractDAO(MyExecutor&lt;T&gt; myExecutor, Class&lt;T&gt; clazz) {
          this.myExecutor = myExecutor;
          this.clazz = clazz;
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Component
  public class MyDAOImpl extends AbstractDAO&lt;Manager&gt; {
      private final SessionManager sessionManager;
      private final MyExecutor&lt;Manager&gt; myExecutor;
  
      @Autowired
      public MyDAOImpl(SessionManager sessionManager, MyExecutor&lt;Manager&gt; myExecutor) {
          super(myExecutor, Manager.class);
  
          this.sessionManager = sessionManager;
          this.myExecutor= myExecutor;
      }
  }
  </code></pre>
  
  <p>I got an error at the definition of the abstract class saying that: "Class doesn't contain matching constructor for autowiring".</p>
  
  <p>All I did is added an additional constructor parameter to the constructor of AbstractDAO which is a Class. I need this because I didn't find a way to detect this out from T at run time (stackflow search says there isn't one). </p>
  
  <p>How can I fix this? How can I pass the Class information which can only be determined in the implementation class?</p>
  
  <p>Many thanks</p>