spring 操作redis基本数据类型的接口
第一组:
BoundValueOperations:字符串类型操作
BoundListOperations:列表类型操作
BoundSetOperations:集合类型操作
BoundZSetOperations:有序集合类型操作
BoundHashOperations:散列操作
BoundValueOperations<String, String> valueOperations = stringRedisTemplate.boundValueOps("key");
BoundListOperations<String, String> listOperations = stringRedisTemplate.boundListOps("key");
BoundSetOperations<String, String> setOperations = stringRedisTemplate.boundSetOps("key");
BoundZSetOperations<String, String> zSetOperations = stringRedisTemplate.boundZSetOps("key");
BoundHashOperations<String, Object, Object> hashOperations = stringRedisTemplate.boundHashOps("key");
第二组:
ValueOperations:字符串类型操作
ListOperations:列表类型操作
SetOperations:集合类型操作
ZSetOperations:有序集合类型操作
HashOperations:散列操作
ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
ListOperations<String, String> listOperations = stringRedisTemplate.opsForList();
SetOperations<String, String> setOperations = stringRedisTemplate.opsForSet();
ZSetOperations<String, String> zSetOperations = stringRedisTemplate.opsForZSet();
HashOperations<String, Object, Object> hashOperations = stringRedisTemplate.opsForHash();
本文介绍了Spring操作Redis中常用的基础数据类型接口,包括BoundValueOperations、BoundListOperations、BoundSetOperations、BoundZSetOperations和BoundHashOperations。通过这些接口,可以方便地进行字符串、列表、集合、有序集合及散列的增删改查等操作。
5076

被折叠的 条评论
为什么被折叠?



