public void trim(long start, long end) {
   ops.trim(getKey(), start, end);
 }
示例#2
0
 /**
  * List数据类型 移出List下标从startIndex到endIndexr之外的值
  *
  * @param key
  * @return null
  */
 public void removeListForIndex(String key, Long startIndex, Long endIndex) {
   listOps = redisTemplate.opsForList();
   listOps.trim(key, startIndex, endIndex);
 }