第一次在Spring Boot里面使用Redis,启动项目出现 RedisCommandExecutionException
RedisCommandExecutionException: ERR Client sent AUTH, but no password is set
看下报错原因:
但是我已经在Spring Boot中配置了Redis的数据源
并且也在 redis.windows.conf 中配置好了对应的密码
出现问题的原因:在Windows资源管理器中双击打开 redis-server.exe 使用的是默认的配置文件,而不是我们手动更改好的redis.windows.conf
使用cmd命令行窗口运行exe文件并指定配置文件即可解决问题
redis-server.exe redis.windows.conf