这个问题是由于使用了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
网友评论