【发布时间】:2018-10-15 02:09:22
【问题描述】:
我得到以下代码:
@Cacheable(value = "cacheName", key = "#someMap.toString()", unless="#result.error")
public List<Book> methodName(Map<Integer, Integer> someMap) throws BookException {
//...
该方法抛出 BookException 并且我想避免在发生这种情况时缓存结果。但是当我执行该方法时:
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'error' cannot be found on object of type 'java.util.ArrayList' - maybe not public?
【问题讨论】:
标签: java spring ehcache spring-el spring-cache