文章目录:
1.RedisTemplate的API
2.Spring-data-redis配置
3.Spring-data-redis处理String类型
4.Spring-data-redis处理Hash类型
5.Spring-data-redis操作List类型
6.Spring-data-redis操作Set类型
7.Spring-data-redis操作ZSet类型
8.StringRedisTemplate
@Test
public void testHash() {
// 类似 Map<String, Map<String, Object>>
// 设置hash值
HashOperations<String, Object, Object> opsForHash = stringRedisTemplate.opsForHash();
opsForHash.put("key1","hashK1","hashV1");
opsForHash.put("key1","hashK2","hashV2");
Map<String, Object> map = new HashMap<>(