JedisConnectionException: Failed connecting to host localhost:6379

Jedis连接失败(已解决):JedisConnectionException: Failed connecting to host localhost:6379

首先检查自己的有没有打开这两个东西

JedisConnectionException: Failed connecting to host localhost:6379
打开redis-cli的时候显示有以下信息才算是成功:
JedisConnectionException: Failed connecting to host localhost:6379
如果没有打开的时候没有显示,那么采用win键+R,进入cmd,输入命令:
redis路径+redis-cli.exe
JedisConnectionException: Failed connecting to host localhost:6379

如果还是没有解决,那么修改配置文件:

注释掉:bind 127.0.0.1
关闭保护模式:protected-mode no

参考链接:
link