title: Spring cache not working for overriden methods in a subclass
body: <p>I can't get Spring cache to work correctly with methods overriden in a subclass also implemented in the superclass.
  For example, I have this abstract service:</p>
  <pre><code>public interface CrudService&lt;E, I&gt; {
    void deleteById(I id);
    E create(E item);
  }
  public abstract class CrudServiceImpl&lt;E, I&gt; {
    void deleteById(I id) { // do things }
    ...
  }
  </code></pre>
  <p>I have several services extending this abstract class for different entities (E) and id types (I). I only want to cache one of them:</p>
  <pre><code>public interface LocationService extends CrudService&lt;Location, String&gt; {
     @CacheEvict(&quot;location&quot;)
     @Override
     void deleteById(String id);
  
     @Cacheable(&quot;location&quot;)
     List&lt;Location&gt; find();
  }
  
  @Service
  public class LocationServiceImpl extends CrudServiceImpl&lt;Location, String&gt; implements LocationService {
     public List&lt;Location&gt; find() { // do things }
  }
  </code></pre>
  <p>Method <em>find</em> is only defined in LocationService, not in the abstract class.
  When I call those methods from a component that also has an abstract class:</p>
  <pre><code>public abstract class CrudManager&lt;E, I&gt; {
      @Autowired
      private CrudService&lt;E, I&gt; crudService; 
  
     public void doDelete(I id) {
        crudService.deleteById(id);
     }
  }
  
  @Component
  public class LocationManager extends CrudManager&lt;Location, String&gt; {
     @Autowired
     private LocationService locationService;
  
     public List&lt;Location&gt; doFind() {
        return locationService.find();
     }
  }
  </code></pre>
  <p>I have confirmed that when <code>LocationManager.doFind</code> is called, it triggers cache operations defined in LocationService, but <code>LocationManager.doDelete</code> don't.</p>
  <p>I have debugged until AbstractFallbackCacheOperationSource.getCacheOperations to realize that the method it's searching operations for is:</p>
  <pre><code>public default void com.ontech.plantcore.service.LocationService.deleteById(java.lang.Object)
  </code></pre>
  <p>with targetClass = LocationServiceImpl.class, instead of my annotated method that is LocationService.deleteById(java.lang.String). So ClassUtils.getMostSpecificMethod fails to find the annotated method and no operations are returned. It happens with Spring 4.3.14 and 4.1.9.</p>
  <p>If I add an specific call in LocationManager to locationService.deleteById it works, but that's just ruining the inheritance.</p>
  <p>I see it's dued to type erasure, but I don't know how to make it works correctly?</p>