springboot+redis整合

1. 代碼已經發布了,見:https://gitee.com/xszhangmin/springboot-redis-demogit

2. 運行單元測試遇到了一個問題:redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool,一直報connection refused的錯誤,查了一遍,發現緣由了。redis

Redis 的配置文件默認是綁定本地ip的,解決方式是 將Redis 的redis.conf 文件中 bind 127.0.0.1註釋掉。spring

相關文章
相關標籤/搜索