SpringBoot+SpringCache+Redis整合,自定义KeyGenerator生成器,@Cacheable设置单个key的缓存时间
目录一、SpringBoot集成SpringCache 1.集成SpringCache,自需要在pom中加入以下依赖: 2.需要在application.properties中配置属性: 3.使用@EnableCaching注解开启缓存 4.简单介绍常用注解二、自定义KeyGenerator1.实现KeyGenerator接口generate方法2.使用My...
原创
2020-01-07 14:05:00 ·
12108 阅读 ·
1 评论