【发布时间】:2012-05-27 13:21:20
【问题描述】:
我正在尝试驱逐 Spring 管理的缓存(Spring 3.1 抽象)中的条目。
我需要参考注解中“key”属性的SpEL中方法的返回值:
/* (How to refer to the 'T' returned value in the "KEY_ID"?) */
@Caching(evict = { @CacheEvict(value = CACHE_BY_ID, key = KEY_ID) })
public T delete(AppID appID, UserID userID) throws UserNotFoundException {
return inner.delete(appID, userID);
}
有什么办法吗?
【问题讨论】:
-
在infoq.com/presentations/Spring-Security-3(1:04:00)中,Wiesner 使用 filterObject 作为返回值的句柄,但这可能只是一个 Spring Security 句柄。我想值得一试。
-
你还不能看到 SPR-8871 并参与其中。
标签: java spring caching spring-el