玩转 SpringBoot 2.x 之 RedisTemplate 操作

abbpd 13 0 PDF 2020-12-25 09:12:30

前言 Spring 专门提供了进行 Redis 操作的抽象 RedisTemplate,底层依然使用 Jedis 或 lettuce。SpringBoot 2 默认使用 lettuce。 Redis 安装 请参考:带你学 Redis:Redis安装(二) 代码案例 引入 spring-boot-starter-data-redis 和 commons-pool2 依赖,具体代码如下: org.springframework.boot spring-boot-starter-data-redis org.apache.commons commons-pool2 然后在

用户评论
请输入评论内容
评分:
暂无评论