1.JedisPoolConfig 没有setMaxTotal/setMaxIdel等方法
解决方法:添加commons-pool2.jar包,注意必须为pool2包
2.Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 12 more
解决方法:添加slf4j-api.jar包
3.Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Failed connecting to host localhost:6379
解决方法:没有开启redis_server,创建连接池前需要先开启redis服务端
4.打开redis_server闪退
解决方法:cmd命令下依次输入
redis-client.exe
shutdown
exit