title: Failed to load ApplicationContext when using @Cacheable annotation
body: <p>I'm integrating Caching into my web application but for some reason Application Context failed to load when adding the @Cacheable annotation.</p>
  
  <p>I have been trying to solve the issue for two days now, your help is really appreciated!</p>
  
  <p>app.context.xml</p>
  
  <pre><code>&lt;cache:annotation-driven cache-manager="EhCacheManagerBean" key-generator="customKeyGenerator" /&gt;
  
  &lt;bean id="EhCacheManagerBean" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcacheBean" /&gt;
  
  &lt;bean id="ehcacheBean" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:EhCache.xml" p:shared="true" /&gt;
  
  &lt;bean id ="customKeyGenerator" class="com.app.site.v2.cache.customKeyGenerator"/&gt;
  
  &lt;bean id="siteService" class="com.app.site.v2.SiteService" primary="true"/&gt;
  </code></pre>
  
  <p>EhCache.xml</p>
  
  <pre><code>&lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
       updateCheck="true"
       monitoring="autodetect"
       dynamicConfig="true"&gt;
  
  &lt;diskStore path="java.io.tmpdir" /&gt;
  
  &lt;cache name="cacheSite"
         maxEntriesLocalHeap="100"
         maxEntriesLocalDisk="1000"
         eternal="false"
         timeToIdleSeconds="300"
         timeToLiveSeconds="600"
         memoryStoreEvictionPolicy="LFU"
         transactionalMode="off"&gt;
      &lt;persistence strategy="localTempSwap" /&gt;
  &lt;/cache&gt;
  </code></pre>
  
  <p></p>
  
  <p>Method that is being cached</p>
  
  <pre><code>public class SiteService implements ISiteService {
  
      @Cacheable("cacheSite")
          public JsonObject getSiteJson(String siteId, boolean istTranslated) { ... }
  
  }
  </code></pre>
  
  <p>Exception that is being thrown</p>
  
  <pre><code>org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'siteService' is expected to be of type 'com.app.site.v2.SiteService' but was actually of type 'com.sun.proxy.$Proxy57'
  </code></pre>