![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
以雾洗梦
这个作者很懒,什么都没留下…
展开
-
将redis key序列化为字符串
package com.test.common.config; import org.springframework.cache.interceptor.SimpleKey; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.support.Def...原创 2019-11-18 00:31:00 · 600 阅读 · 0 评论 -
RedisTemplate 配置,自定义key生成策略,过期时间等
package com.test.common.config; import java.time.Duration; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnMi...原创 2019-11-18 00:33:28 · 3635 阅读 · 0 评论 -
redis 主从复制 replication
主服务器能新增查询, 从服务器只能查询,无法写入,(客户端连接从服务器写入后再次刷新后丢失) 从服务器尝试写入报错:(error) READONLY You can't write against a read only slave. 主服务器启动 redis-server --port 6379 从服务器 启动 redis-server --port 6380 --slaveof ...原创 2019-09-16 23:52:48 · 101 阅读 · 0 评论