title: spring data - get beans in a custom default repository implementation
body: <p>Im trying to upgrade my project from <code>spring-boot-1.4.3.RELEASE</code> to <code>spring-boot-1.5.9.RELEASE</code>.</p>
  
  <p>In the <code>1.4.3.RELEASE</code> the way I have used my custom implementation of repositories is as follow:</p>
  
  <ol>
  <li>Made an interface <code>MyCustomRepositroy</code> that extends <code>JpaRepository</code></li>
  <li>Had a class <code>MyCustomRepositoryImpl</code> that implements <code>MyCustomRepositroy</code> and <code>SimpleJpaRepository</code>. In that class I have changed the behavior of<br>
  the of <code>save</code>, <code>find</code> and <code>delete</code> methods, because I needed a<br>
  ceratin behavior for entitys of certain type (lets say that I need a
  custom <code>save</code> for all entitys that implements <code>Special</code> interface)</li>
  <li>I made a <code>MyCustomJpaRepositoryFactoryBean</code> that extends <code>JpaRepositoryFactoryBean</code>. In that factory, I've overridden <code>createRepositoryFactory</code> and gave it my <code>MyRepositoryFactory</code> implementation.
  In <code>MyRepositoryFactory</code> implementation I've overridden the <code>getTargetRepository</code>, and <code>getRepositoryBaseClass</code>.In these methods, I check if the entity is of type <code>Special</code>, and if so, I return <code>MyCustomRepositoryImpl</code>, otherwise I return <code>SimpleJpaRepository</code>.</li>
  </ol>
  
  <p>Also, I can get the beanFactory in my <code>MyCustomRepositoryImpl</code> class because I call my own constructor of <code>MyCustomRepositoryImpl</code> that has also a beanFactory parameter via <code>getTargetRepositoryViaReflection</code>.</p>
  
  <p>Now, with the new version (that uses <code>spring-data-commons-1.13.9.RELEASE</code>), I cannot override the Factory class, and hence can't decide for each entitiy which implementation to give, and have no way to get the beanFactory.</p>
  
  <p>Is there any way I can get what I want?</p>
  
  <p>Sorry for the mess, but I cannot post my code here.</p>
  
  <p>P.S - my project is a spring based library, so I can't do anything to the entitys because my clients declare them, all I know that some entitys implement the <code>Special</code> interface and some don't</p>