因此,我在 Spring Roo 项目中使用了 ehcache-spring-annotations 1.2.0,并且每次遇到它没有创建的嵌套注释时,Roo 都完全适合。有没有办法在不使用嵌套注释的情况下重写这个注释?
@Cacheable(cacheName = "CacheName",
keyGenerator = @KeyGenerator (
name = "ListCacheKeyGenerator",
properties = {
@Property(name="useReflection", value="true"),
@Property(name="checkforCycles", value="true")}))
public void method() {
// do something that needs cached
}