springboot+redis整合

1. 代码已经发布了,见:https://gitee.com/xszhangmin/springboot-redis-demo

2. 运行单元测试遇到了一个问题:redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool,一直报connection refused的错误,查了一遍,发现原因了。

Redis 的配置文件默认是绑定本地ip的,解决方式是 将Redis 的redis.conf 文件中 bind 127.0.0.1注释掉。

猜你喜欢

转载自my.oschina.net/u/3337958/blog/1799036