zzsoszz / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

How use Ehcache Spring Annotations with generic DAO? #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How use Ehcache Spring Annotations with generic DAO? 
My code: 
    @Cacheable(cacheName="cacheName") 
    public List<T> findAll() { 

        return getJpaTemplate().find(String.format("SELECT o FROM %1$s 

o", entityClass.getName())); 
    } 
All inherited classes return then values of the first. 

Original issue reported on code.google.com by yakl...@gmail.com on 10 Jan 2011 at 2:56

GoogleCodeExporter commented 9 years ago
Due to the nature of Spring's AOP proxies self-referential calls will not work. 
The annotated method will only behave as expected if called from a different 
Spring bean.

For additional help please use the email list: 
http://groups.google.com/group/ehcache-spring-annotations

Original comment by eric.dalquist on 10 Jan 2011 at 3:12