当前位置:网站首页>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
边栏推荐
- C language games - minesweeping
- 【每周一坑】计算100以内质数之和 +【解答】输出三角形
- Anaconda安装后Jupyter launch 没反应&网页打开运行没执行
- [DIY]如何制作一款个性的收音机
- [weekly pit] positive integer factorization prime factor + [solution] calculate the sum of prime numbers within 100
- (工作记录)2020年3月11日至2021年3月15日
- Quel genre de programmation les enfants apprennent - ils?
- 2022 portal crane driver registration examination and portal crane driver examination materials
- Xcode6 error: "no matching provisioning profiles found for application"
- HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
猜你喜欢

【DSP】【第二篇】了解C6678和创建工程

SQL injection 2

SSO single sign on
![[asp.net core] set the format of Web API response data -- formatfilter feature](/img/6b/e3d513f63b244f9f32555d3b3bec8c.jpg)
[asp.net core] set the format of Web API response data -- formatfilter feature

Anaconda安装后Jupyter launch 没反应&网页打开运行没执行

01 basic introduction - concept nouns

I've seen many tutorials, but I still can't write a program well. How can I break it?

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

性能测试过程和计划

强化学习-学习笔记5 | AlphaGo
随机推荐
【每周一坑】输出三角形
Rhcsa Road
2022 portal crane driver registration examination and portal crane driver examination materials
SSO single sign on
Gui Gui programming (XIII) - event handling
How to upgrade high value-added links in the textile and clothing industry? APS to help
Spark SQL chasing Wife Series (initial understanding)
小孩子学什么编程?
Review questions of anatomy and physiology · VIII blood system
use. Net analysis Net talent challenge participation
Minimum cut edge set of undirected graph
B-jiege's tree (pressed tree DP)
Error analysis ~csdn rebound shell error
OLED屏幕的使用
Variable star --- article module (1)
(work record) March 11, 2020 to March 15, 2021
报错分析~csdn反弹shell报错
Zoom with unity mouse wheel: zoom the camera closer or farther
B-杰哥的树(状压树形dp)
Unity load AB package