当前位置:网站首页>Redis insert data garbled solution
Redis insert data garbled solution
2022-07-06 20:39:00 【xiao pan】
1、key and value The statement

2、 New configuration class
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import javax.annotation.PostConstruct;
@Configuration
public class RedisUtils {
@Autowired
private RedisTemplate redisTemplate;
@PostConstruct
public void init() {
initRedisTemplate();
}
private void initRedisTemplate() {
RedisSerializer stringSerializer = redisTemplate.getStringSerializer();
redisTemplate.setKeySerializer(stringSerializer);
redisTemplate.setHashKeySerializer(stringSerializer);
redisTemplate.setValueSerializer(stringSerializer);
redisTemplate.setHashValueSerializer(stringSerializer);
}
}3、 Perfect solution to garbled code
边栏推荐
- Notes on beagleboneblack
- Zoom with unity mouse wheel: zoom the camera closer or farther
- Gui Gui programming (XIII) - event handling
- Error analysis ~csdn rebound shell error
- JS implementation force deduction 71 question simplified path
- Special topic of rotor position estimation of permanent magnet synchronous motor -- Summary of position estimation of fundamental wave model
- 2110 summary of knowledge points and common problems in redis class
- Web security - payload
- “罚点球”小游戏
- 2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third
猜你喜欢

Basic knowledge of lists

Force deduction brush question - 98 Validate binary search tree

2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third

Quel genre de programmation les enfants apprennent - ils?

棋盘左上角到右下角方案数(2)

1_ Introduction to go language

Design your security architecture OKR

How does kubernetes support stateful applications through statefulset? (07)

Value of APS application in food industry

(工作记录)2020年3月11日至2021年3月15日
随机推荐
B-jiege's tree (pressed tree DP)
1_ Introduction to go language
C language games - three chess
Build your own application based on Google's open source tensorflow object detection API video object recognition system (IV)
2110 summary of knowledge points and common problems in redis class
Value of APS application in food industry
逻辑是个好东西
知识图谱构建流程步骤详解
【每周一坑】信息加密 +【解答】正整数分解质因数
OLED屏幕的使用
(工作记录)2020年3月11日至2021年3月15日
Tencent T4 architect, Android interview Foundation
In line elements are transformed into block level elements, and display transformation and implicit transformation
Minimum cut edge set of undirected graph
【DSP】【第一篇】开始DSP学习
【每周一坑】正整数分解质因数 +【解答】计算100以内质数之和
新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
What programming do children learn?
Utilisation de l'écran OLED
Basic knowledge of lists