mask 数据替换,代码暂存
This commit is contained in:
@@ -21,6 +21,9 @@ public class RedisUtil {
|
||||
@Resource
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, List<List<Long>>> redisListTemplate;
|
||||
|
||||
public Boolean hasKey(String key){
|
||||
return redisTemplate.hasKey(key);
|
||||
}
|
||||
@@ -228,5 +231,14 @@ public class RedisUtil {
|
||||
return redisTemplate.opsForValue().increment(key, 0);
|
||||
}
|
||||
|
||||
public final static String NO_GRADIENT = "NoGradient";
|
||||
public final static String WITH_GRADIENT = "WithGradient";
|
||||
public void addToStringList(String key, List<List<Long>> list){
|
||||
redisListTemplate.opsForValue().set(key, list);
|
||||
}
|
||||
|
||||
public List<List<Long>> getFromStringList(String key){
|
||||
return redisListTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user