当前位置:网站首页>RedisTemplate使用遇到\x00的问题
RedisTemplate使用遇到\x00的问题
2022-06-22 21:17: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);**进行设置
边栏推荐
- 企业数字化不是各自发展,而是全面SaaS化推进
- Tianyi cloud takes advantage of the new infrastructure to build a "4+2" capability system for digital transformation
- Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file
- MySQL master-slave synchronization and its basic process of database and table division
- Canvas generate Poster
- 周国华 读书随记
- OJ daily practice - find the first character that only appears once
- WebRTC系列-网络传输之4Connection排序
- Webrtc series - 4connection sorting of network transmission
- SOA Service Oriented Architecture
猜你喜欢

OJ daily practice - spanning 2020

在Word中自定义多级列表样式

保证数据库和缓存的一致性

2021-08-21

The breakthrough of key chips hindering Huawei 5g mobile phones has been achieved, and domestic chips have gained 10% share

After passing the hcip exam, I still failed to change my career. What do professional network workers value most

优化——线性规划

Digital data depth | about software self-control, source code left, no code right

Asynchronous FIFO

Redis cache
随机推荐
OJ daily practice - sorting and naming
Customize multi-level list styles in word
2021-04-05
2021-08-21
Common operations of sourcetree version management
Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file
[redisson] source code analysis of multilock
2021-07-27
防抖&节流 加强版
C language greedy snake
LeetCode_ Backtracking_ Dynamic programming_ Medium_ 131. split palindrome string
LeakCanary 源码详解(2)
Unity:利用 射线Ray 检测物体
Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
ArcGIS application (20) the ArcGIS grid image symbol system prompts "this dataset does not have valid histogram required for classificati..."
SOA Service Oriented Architecture
Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems
剑指 Offer 07. 重建二叉树
os.Args[1:]中命令行参数为空时,不执行内部语句
剑指 Offer 05. 替换空格