title: Customizing spring data JPA constructor exception
body: <p>I'm new to spring data and I'm trying to customize it. here is what I tried so far:
  My base repository interface</p>
  
  <pre><code>public interface IBaseRepository&lt;T extends BaseEntity&lt;PK&gt;, PK extends Serializable&gt; extends JpaRepository&lt;T, PK&gt; {
  }
  </code></pre>
  
  <p>And it's implementation</p>
  
  <pre><code>public class BaseRepository&lt;T extends BaseEntity&lt;PK&gt;, PK extends Serializable&gt; extends SimpleJpaRepository&lt;T, PK&gt;
    implements IBaseRepository&lt;T, PK&gt; {
  
  public BaseRepository(Class&lt;T&gt; domainClass, EntityManager em) {
    super(domainClass, em);
  }
  }
  </code></pre>
  
  <p>Now I want to have standalone repository class for users so</p>
  
  <pre><code>public interface IUserRepository extends IBaseRepository&lt;User, Long&gt; {
  
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>@Repository
  public class UserRepository extends BaseRepository&lt;User, Long&gt; implements IUserRepository {
  
    UserRepository(Class&lt;User&gt; domainClass, EntityManager em) {
    super(domainClass, em);
    }
  
  }
  </code></pre>
  
  <p>But I got this exception:</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Parameter 0 of constructor in com.bia2hd.dao.impl.UserRepository required a bean of type 'java.lang.Class' that could not be found.
  
  
  Action:
  
  Consider defining a bean of type 'java.lang.Class' in your configuration.
  </code></pre>