tri*_*bal 1 java spring ehcache spring-el spring-cache
我得到以下代码:
@Cacheable(value = "cacheName", key = "#someMap.toString()", unless="#result.error")
public List<Book> methodName(Map<Integer, Integer> someMap) throws BookException {
//...
Run Code Online (Sandbox Code Playgroud)
该方法抛出BookException并且我想避免在发生这种情况时缓存结果。但是当我执行该方法时:
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'error' cannot be found on object of type 'java.util.ArrayList' - maybe not public?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8311 次 |
| 最近记录: |