org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.


这个前提是要检查一下Redis服务是否启动
在使用springboot的2.2.6.RELEASE版本连接Redis的时候,启动报错

配置文件是如下

spring.redis.host=127.0.0.1
spring.redis.port=6379


报错原因是在安装配置Redis的时候没有给Redis设置密码
现在要设置密码,在springboot配置文件中添加上即可
找到Redis的安装目录,看见 redis.windows.conf 文件

添加修改 requirepass属性

然后去安装目录找到

1.设置密码:config set requirepass “123456”
2.连接redis,认证:auth 123456

最后在配置文件中加上密码就行了

更多推荐

org.springframework.data.redis.RedisSystemException: Error in execution; nes遇到sp