![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot-Redis
奇怪的程序猿
求人不如求己,与其临渊羡鱼,不如退而结网!
展开
-
springboot 集成redis系列一
单一的Redis 数据源pom.xml 中引入redis的包添加redis 的配置信息注入redisTemplate 及对key,value等进行序列化添加redisService 及其实现类 实现redis 的一些方法 ,方便我们调用redisService 的调用pom.xml 中引入redis的包<dependency> <groupId>org.spring...原创 2019-08-02 12:11:59 · 194 阅读 · 0 评论 -
springboot 集成redis系列二
如何集成多个redis 数据源并且轻松的管理使用第一步,同样是需要引入redis 依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <...原创 2019-08-02 12:31:48 · 239 阅读 · 0 评论 -
springboot 集成redis系列三
SpringBoot 使用 redis 作为缓存中间件 对查询结果进行二级缓存这里接上一篇文章,在集成了多个redis 数据源后,如果要使用其中的某个数据源进行查询的二级缓存,可以按照如下步骤进行添加一个新的redis连接 cache 为新加的spring: redis: timeout: 0 # 连接超时时间(毫秒) jedis: pool: ...原创 2019-08-02 14:43:38 · 186 阅读 · 0 评论