- 引入jar包
1 | <dependency> |
- 配置bean(ps:集群在spring-data-redis 1.7.0之后才支持)
1 | <!--redis缓存配置 纯代码配置也行--> |
3.在需要使用缓存的地方使用@CachePut @Cacheable @CacheEvict就可使用redis缓存
1 | <dependency> |
1 | <!--redis缓存配置 纯代码配置也行--> |
3.在需要使用缓存的地方使用@CachePut @Cacheable @CacheEvict就可使用redis缓存