Redis的安装以及spring整合Redis时出现Could not get a resource from the pool

Redis的下载与安装

  1. 在Linux上使用wget http://download.redis.io/releases/redis-5.0.0.tar.gz下载源码到指定位置
  2. 解压:tar -xvf redis-5.0.0.tar.gz
  3. cd redis-5.0.0.tar.gz
  4. make:编译(如果Linux上没有装gcc编译环境,则执行yum -y install gcc-c++)
  5. make install:把Redis的cli和server添加到bin中,相当于配置环境变量
  6. vim redis.conf,把daemonize的值改为yes:把Redis设置为后台运行
  7. 启动Redis:redis-server redis.conf
  8. 停止Redis:redis-cli shutdown
  9. 设置密码:vim redis.conf,然后找到requirepass把它的值改成你要设置的密码即可

Jedis连接Redis的一些错误解决方案

spring整合Redis的过程中,如果出现下图的错误:

解决方法把下图中的true改为false:

即可解决问题

原文地址:https://www.cnblogs.com/caotao0918/p/9985259.html