I'm migrating my application from spring boot 1.5.x to 2.0.x. I want to keep jedis but I have a problem with the instantiation of RedisCacheManager
.
Now constructor signature is
RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration)
But before it was:
RedisCacheManager(RedisOperations redisOperations)
I define this bean having only RedisTemplate
in scope:
@Bean
public RedisCacheManager redisCacheManager(RedisTemplate redisTemplate) {
HandleRedisCacheManager redisCacheManager = new HandleRedisCacheManager(redisTemplate);
redisCacheManager.setUsePrefix(true);
return redisCacheManager;
}
How is it supposed to be created now?
RedisTemplate
as parametr to constructor - does the logic of the code by omitting it changed? Or is the same as it was in SpringBoot 1.5? – Maidenhood