\xAC\xED\x00\x05t\x00\x132021_7_22_testvalue
问:为什么对数据操作要加上 【 .opsForValue()】?
答:没什么原因,单纯就是 spring 对 redis 的所有指令做了封装,每个类型一个对应的操作对象。你看 redisTemplate 的源码就能看出来。
理解详细地址:
http://357029540.iteye.com/blog/2388965
http://www.cnblogs.com/songanwei/p/9274348.html 详细
全部的方法对应对应的对象!!! redisTemplate.opsForValue();//操作字符串 redisTemplate.opsForHash();//操作hash redisTemplate.opsForList();//操作list redisTemplate.opsForSet();//操作set redisTemplate.opsForZSet();//操作有序set
的相关博客
https://blog.csdn.net/qq_25135655/article/details/80357137?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162686527516780366521558%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=162686527516780366521558&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v29-2-80357137.pc_search_result_cache&utm_term=redisTemplate.opsForValue%28%29%E4%B8%BA%E4%BB%80%E4%B9%88%E6%98%AF%E4%BA%8C%E8%BF%9B%E5%88%B6&spm=1018.2226.3001.4187