测试验证码存入redis时,spring报错:
org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 192.168.161.129:6379
原因:
虚拟机防火墙未关闭,spring无法连接redis
解决方法:
关闭虚拟机防火墙
systemctl stop firewalld
- Post link: http://example.com/2021/06/02/Spring%E8%BF%9E%E6%8E%A5Redis%E6%8A%A5%E9%94%99/
- Copyright Notice: All articles in this blog are licensed under unless otherwise stated.