日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

org.springframework.data.redis.RedisSystemException: Error in execution; nes遇到springboot連接Redis報錯

作者:Casey·Hu 更新時間: 2022-05-25 編程語言

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
在這里插入圖片描述
最后在配置文件中加上密碼就行了
在這里插入圖片描述

原文鏈接:https://blog.csdn.net/qq_43658218/article/details/122521138

欄目分類
最近更新