SpringBoot+Redis形成数据 缓存

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot+Redis形成数据 缓存相关的知识,希望对你有一定的参考价值。

 

步骤:

第一  引入redis依赖包

第二  配置application.propresties 配之类   配置redis服务器地址

第三  创建redis配置类 开启缓存配置(@enableCaching) 配置缓存管理器(cacheManger) 配置KEY生成策略

第四  仓库中直接使用@cacheable(value="")

 

 

详情参考:

https://segmentfault.com/a/1190000004389938

以上是关于SpringBoot+Redis形成数据 缓存的主要内容,如果未能解决你的问题,请参考以下文章

SpringBoot学习—— springboot快速整合Redis

springboot高级特性-redis作为缓存

springboot中使用RedisTemplate实现redis数据缓存

SpringBoot+Mybatis+redis实现二级缓存

SpringBoot 结合 Spring Cache 操作 Redis 实现数据缓存

完美取代hashmap,SpringBoot整合Redis缓存DB数据