一、问题描述
在 application.yml 中配置 Redis 连接信息如下:
# Redis
redis:
host: 192.168.1.38
port: 6379
password: ‘!abc123456’
编译时报错 RedisCommandExecutionException: WRONGPASS invalid username-password pair:
Caused by: io.lettuce.core.RedisCommandExecutionException: WRONGPASS invalid username-password pair
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:137)
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:110)
......
二、解决方法
password 的引号使用了中文引号!应使用英文引号!
# Redis
redis:
host: 192.168.1.38
port: 6379
password: '!abc123456'