当前位置:网站首页>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
边栏推荐
- OLED屏幕的使用
- Continuous test (CT) practical experience sharing
- 解剖生理学复习题·VIII血液系统
- Comment faire une radio personnalisée
- Event center parameter transfer, peer component value transfer method, brother component value transfer
- [cloud lesson] EI lesson 47 Mrs offline data analysis - processing OBS data through Flink
- 全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
- The mail command is used in combination with the pipeline command statement
- Why do novices often fail to answer questions in the programming community, and even get ridiculed?
- How to turn a multi digit number into a digital list
猜你喜欢

Learn to punch in Web

Pytest (3) - Test naming rules

Number of schemes from the upper left corner to the lower right corner of the chessboard (2)

01 basic introduction - concept nouns

PHP online examination system version 4.0 source code computer + mobile terminal

Special topic of rotor position estimation of permanent magnet synchronous motor -- fundamental wave model and rotor position angle

B-杰哥的树(状压树形dp)

Continuous test (CT) practical experience sharing

Basic knowledge of lists

Leetcode question 283 Move zero
随机推荐
Function optimization and arrow function of ES6
C language games - three chess
电子游戏的核心原理
2022 portal crane driver registration examination and portal crane driver examination materials
8086 instruction code summary (table)
性能测试过程和计划
Notes on beagleboneblack
Special topic of rotor position estimation of permanent magnet synchronous motor -- Summary of position estimation of fundamental wave model
持续测试(CT)实战经验分享
Detailed introduction of distributed pressure measurement system VIII: basic introduction of akka actor model
小孩子學什麼編程?
B-杰哥的树(状压树形dp)
Leetcode question 283 Move zero
Error analysis ~csdn rebound shell error
SSO single sign on
7、数据权限注解
棋盘左上角到右下角方案数(2)
Special topic of rotor position estimation of permanent magnet synchronous motor -- fundamental wave model and rotor position angle
Why do novices often fail to answer questions in the programming community, and even get ridiculed?
C language games - minesweeping