StringRedisTemplate与RedisTemplate

StringRedisTemplate

它存得是字符串类型得数据到redis中

操作如下

//生成一个空键和空值
ValueOperations<String, String> stringStringValueOperations = stringRedisTemplate.opsForValue();
//往redis里面存值
stringStringValueOperations .set("键","值");
//其它方法
opsForHash();   //操作hash
opsForList();   //操作list
opsForSet();    //操作set
opsForZSet();   //操作有序set

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章