springboot集成jedis,不使用redis密码 请参考最佳损友的 https://www.cnblogs.com/bestfriends/archive/2018/03/19/8605916.html
如果需要密码,我是在他的基础上做了一点改动,不然会报 :Redis (error) NOAUTH Authentication required.
最佳损友只设置了port和host,我看了看Jedis这个类,里面的构造方案有一个
public Jedis(JedisShardInfo shardInfo) {
super(shardInfo);
}
而 JedisShardInfo类中可以设置 password,至此完美解决。
启示录:
要简单分析源码,知道怎么实现的,大体的,然后改动,实现自己想要的。