美文网首页
new RedisCacheManager(redisTempl

new RedisCacheManager(redisTempl

作者: 雨夏_ | 来源:发表于2018-10-12 11:11 被阅读91次
image

这个问题是由于使用了spring boot 2.0的问题,在spring boot 2.0中RedisCacheManager,没有以下构造器

 @SuppressWarnings("rawtypes")
    public RedisCacheManager(RedisOperations redisOperations) {
        this(redisOperations, Collections.<String> emptyList());
    }

可以修改为:

public CacheManager cacheManager(RedisConnectionFactory factory) {
        RedisCacheManager cacheManager = RedisCacheManager.create(factory);
        return cacheManager;
    }

参考链接:https://blog.csdn.net/sy793314598/article/details/80719224

相关文章

网友评论

      本文标题:new RedisCacheManager(redisTempl

      本文链接:https://www.haomeiwen.com/subject/jsbwaftx.html