整理不易,点点小编,一键三连走一波~~~
笔记来自《小滴课堂-新版Redis6学习笔记》
第7集 SpringBoot整合Jedis+Lettuce客户端连接池配置实战
简介:SpringBoot整合Jedis+Lettuce客户端连接池配置实战
-
基于SpringDataRedis可以快速替换底层实现
- Lettuce连接池介绍(添加连接池)
org.apache.commons commons-pool2
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.lettuce.pool.max-active = 10
# 连接池中的最大空闲连接
spring.redis.lettuce.pool.max-idle = 10
# 连接池中的最小空闲连接
spring.redis.lettuce.pool.min-idle = 0
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.lettuce.pool.max-wait= -1ms
#指定客户端
spring.redis.client-type = lettuce
- Jedis连接池介绍(可以不排除lettuce依赖包)
org.springframework.boot spring-boot-starter-data-redis
io.lettuce lettuce-core
redis.clients jedis
org.apache.commons commons-pool2
2.6.1 # 连接池最大连接数(使用负值表示没有限制)
spring.redis.jedis.pool.max-active = 10
# 连接池中的最大空闲连接
spring.redis.jedis.pool.max-idle = 10
# 连接池中的最小空闲连接
spring.redis.jedis.pool.min-idle = 0
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.jedis.pool.max-wait= -1ms
#指定客户端
spring.redis.client-type = jedis
-
断点调试 redisTemplate的connectionFactory实现
愿景:"让编程不再难学,让技术与生活更加有趣"
更多架构课程请访问 xdclass.net
想要了解更多?关注公众号领取更多干货!!!
前端、后端、测试等方面,各种干货等你来拿



