摘要: 在微服务中缓存重建的时候一般会考虑使用分布式锁来避免缓存重建工作在不同的服务中重复执行 以下是使用Spring Cloud工程,基于Redis实现的分布式锁, 使用时需要引入 spring-boot-data-redis 依赖 import org.springframework.beans.fac 阅读全文
posted @ 2021-10-07 18:38 半雨微凉 阅读(63) 评论(0) 推荐(0) 编辑