使用Spring Boot缓存时如何在RedisCacheManager中使用RedisTemplate

时间:2019-01-30 11:50:12

标签: spring-boot spring-data-redis spring-cache

我正在尝试在Redis中使用spring缓存。 @Cacheable批注为redis作为缓存提供了非常基本的支持。我想使用redis提供的列表操作等。

为此,我了解的是,我需要RedisTemplate。这些是Spring Data Redis 2.0.x中的任何方式,我可以在其中绑定Redis模板和缓存管理器。 之前有一个构造函数RedisCacheManager(RedisOperations redisOperations)。不确定从v2.0起采用什么方法

0 个答案:

没有答案