SpringBoot RedisTemplate使用jedis在

2019-11-08  本文已影响0人  steamed_bun

1、使用SpringBoot的RedisTemplate时需要在配置文件中向容器中注入RedisConnectionFactory

2、打开RedisConnectionFactory接口可以如下的方法

/**
 * Provides a suitable connection for interacting with Redis Cluster.
 * 提供一个连接redis集群的连接
 *
 * @return
 * @since 1.7
 */
RedisClusterConnection getClusterConnection();

3、查看这个方法的实现 只有两个

getClusterConnection()的实现类.png
4、分别查看getClusterConnection()方法可以看到:
上一篇 下一篇

猜你喜欢

热点阅读