Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2222

How to create RedisCacheManager in spring-data 2.0.x

$
0
0

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:

@Beanpublic RedisCacheManager redisCacheManager(RedisTemplate redisTemplate) {    HandleRedisCacheManager redisCacheManager = new HandleRedisCacheManager(redisTemplate);    redisCacheManager.setUsePrefix(true);    return redisCacheManager;}

How is it supposed to be created now?


Viewing all articles
Browse latest Browse all 2222

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>