【发布时间】:2014-11-16 15:12:09
【问题描述】:
我想知道有没有办法使用 SpEL 来过滤掉空集合之类的值。
我的缓存当前过滤掉了空值:
@Cacheable(value = "groupIdToGroupNames",unless = "#result == null")
public Map<Long, Collection<String>> findAllBySearchCustomerKey(final long groupId) {
return idToNameClient.findAllGroupMembersById(groupId);
}
我正在尝试找到一种方法来过滤掉大小为 0 但不为空的组。 有没有办法通过使用@Cacheable 的参数来做到这一点?
任何帮助将不胜感激。
【问题讨论】:
标签: java spring spring-integration spring-el