当前位置:网站首页>最新Redistemplate配置及使用,附带操作工具类,测试类
最新Redistemplate配置及使用,附带操作工具类,测试类
2022-07-30 05:40:00 【Lucky-boy-kj】
1.引入pom.xml,并配置yml,添加config类--->替换原默认配置的redistemplate
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>#redis 配置
spring:
redis:
database: 0
host: localhost
port: 6379
password: 123456
jedis:
pool:
max-active: 200
max-wait: 10
max-idle: 10
min-idle: 0
timeout: 10000
@Configuration
public class RedisConfig {
/**
* 默认是JDK的序列化策略,这里配置redisTemplate采用的是Jackson2JsonRedisSerializer的序列化策略
* @param redisConnectionFactory
* @return
*/
// @ConditionalOnMissingBean(name = "redisTemplate")
@Bean
public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory){
// public RedisTemplate<String,Object> redisT边栏推荐
- 中间件cors三行代码解决跨域问题GET,POST跨域访问解决
- list(列表)和array(数组)的区别
- C语言人机大战之三字棋博弈
- Record Breaker (Google Kickstart2020 Round D Problem A)
- cJSON开源项目详细解剖
- 三子棋游戏——C语言
- My first understanding of MySql, and the basic syntax of DDL and DML and DQL in sql statements
- 自定义异常类的使用
- Navicat connection MySQL error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
- Arrange numbers (DAY90) dfs
猜你喜欢
随机推荐
社区版idea 最右侧没有Database怎么办
函数解剖——深挖getchar()与putchar()
MySQL 数据库基础知识(系统化一篇入门)
131.分割回文串
C语言指针(指针数组、数组指针、函数指针、传参、回调函数等)超详细
面试前需要巩固的算法知识点(自用,更新中)
配环境 / 初步测试
三子棋游戏——C语言
MySQL 安装报错的解决方法
Frobenius norm(Frobenius 范数)
分支和循环语句
函数解剖——深挖printf()与scanf()
Graphic mirror symmetry (schematic diagram)
P3 元宝第三天的笔记
C语言(字符串,转义字符,关键字)
别找了,你要的C语言“数组”在这里
5.5线程池
create-nuxt-app创建出来的项目没有server
How is crawler data collected and organized?
‘kaggle视频游戏销售数据的可视化和分析‘项目实现









