0

这就是javadoc提到JReJSON的定义的方式

JReJSON(String host, int port)
Creates a client to the specific host/post a client to the specific host/post 

但有提供密码的规定

连同主机和端口,因为只有两个参数不足以创建客户端,因为缺少身份验证,这是通过提供密码启用的

4

1 回答 1

0

尝试使用JReJSON(Pool<Jedis> jedis)构造函数。

例如

new JReJSON(new JedisPool(host, port, user, password))

如果您的 Redis 版本早于 Redis 6 或者您不想使用该user参数:

new JReJSON(new JedisPool(host, port, null, password))
于 2021-04-12T13:49:30.593 回答