Java 在不使用嵌套批注的情况下向@Cacheable批注添加属性
因此,我在SpringRoo项目中使用了EhcacheSpringAnnotations1.2.0,Roo每次运行到它没有创建的嵌套注释中时都有一个完全适合的版本。有没有办法不使用嵌套批注重写此批注Java 在不使用嵌套批注的情况下向@Cacheable批注添加属性,java,spring,annotations,ehcache,Java,Spring,Annotations,Ehcache,因此,我在SpringRoo项目中使用了EhcacheSpringAnnotations1.2.0,Roo每次运行到它没有创建的嵌套注释中时都有一个完全适合的版本。有没有办法不使用嵌套批注重写此批注 @Cacheable(cacheName = "CacheName", keyGenerator = @KeyGenerator ( name = "ListCacheKeyGenerator", propertie
@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
}