当前位置:网站首页>RedisTemplate使用遇到\x00的問題
RedisTemplate使用遇到\x00的問題
2022-06-22 23:40:00 【心懷敬意】
如題:
使用 RedisApi的時候已經設置RedisTemplate的key和value的序列化規則
template.setKeySerializer(stringRedisSerializer);
template.setValueSerializer(jackson2JsonRedisSerializer);
template.setHashValueSerializer(jackson2JsonRedisSerializer);
template.setHashKeySerializer(stringRedisSerializer);
出現的現象是使用**void set(K key, V value, long offset);設值的時候,值的前綴多了很多\x00的字符。
解决方式:使用void set(K key, V value, long timeout, TimeUnit unit);**進行設置
边栏推荐
- three.js模拟驾驶游览艺术展厅---打造超级相机控制器
- Finding the value of the nth term of Fibonacci sequence by recursion
- Canvas generate Poster
- Tianyi cloud takes advantage of the new infrastructure to build a "4+2" capability system for digital transformation
- Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems
- js----SVG转PNG
- Digital data was invited to participate in Nantong enterprise digital transformation Seminar
- Enjoy high-performance computing! Here comes the Tianyi cloud HPC solution
- os.Args[1:]中命令行参数为空时,不执行内部语句
- Spark SQL Generic Load/Save Functions(2.4.3)
猜你喜欢

反向代理HAProxy

弱电转职业网工难不难?华为售前工程师分享亲身经历

Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems

C language -- 17 function introduction

Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!
![[kubernetes series] overview of kubernetes](/img/c2/b42f7a0db236558cc466a508d3d579.png)
[kubernetes series] overview of kubernetes

数据库访问工具简介

Leakcanary source code (2)

OJ daily practice - filter extra spaces

Synchronization circuit and cross clock domain circuit design 2 -- cross clock domain transmission (FIFO) of multi bit signals
随机推荐
SSH method 2 for adding node nodes in Jenkins
程序员接私活兼职选择
13. Roman numeral to integer
Array and string offset access syntax with curly braces is no longer support
js读取剪切板的图片
'dare not doubt the code, but have to doubt the code 'a network request timeout analysis
双重跨域:Access-Allow-Origin header contains multiple values“*, *”,but only one is allowed
After passing the hcip exam, I still failed to change my career. What do professional network workers value most
Is it difficult to turn weak current into professional network worker? Huawei pre-sales engineers share their own experience
Introduction to database access tools
Future alternatives to IPv4! Read the advantages, features and address types of IPv6
C language -- 17 function introduction
Phantomjs utility code snippet (under continuous update...)
OJ daily exercise - virus proliferation
Unity: use ray to detect objects
剑指 Offer 06. 从尾到头打印链表
js图片分辨率压缩
os. When the command line parameter in args[1:] is empty, the internal statement will not be executed
OJ daily practice - delete word suffixes
Eslint simple configuration