我正在尝试在我的Spring应用程序中连接Redis。我在红云redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228中创建了一个Redis数据库。
我已经在我的application.properties中配置了以下内容
spring.redis.host=redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228
spring.redis.password=<password-from-redis-cloud>我仍然得到红色连接失败事件后,提供密码。
reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228
Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228我的部分做错了吗?
发布于 2022-03-15 13:37:37
您需要在另一个属性中指定redis端口:
spring.redis.host=redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com
spring.redis.port=10228有关更多详细信息,请参阅这。
https://stackoverflow.com/questions/71482487
复制相似问题