Skip to main content

java redis client

· One min read

背景

背景是需要了解java的redis是怎么使用的

redission

redisson 是java的一个redis客户端

接入spring boot 遇到的问题

spring boot 启动遇到了问题redirection loop detected , 是因为测试环境redis是cluster 模式 , 但是本地配置是单个节点,所以会有问题

org.springframework.dao.InvalidDataAccessApiUsageException: MOVED redirection loop detected. Node redis://10.2.26.106:6379 has further redirect to redis://xxx:6379; nested exception is org.redisson.client.RedisException: MOVED redirection loop detected. Node redis://10.2.26.106:6379 has further redirect to redis://xxx:6379

解决方案 : 在配置文件改成cluster 就可以正常get 和set 了

相关阅读