当前位置:网站首页>解决问题:Unable to connect to Redis
解决问题:Unable to connect to Redis
2022-07-07 04:16:00 【Charter1】
错因:无法连接到redis
最近在使用springboot整合redis时,出现的错误:
Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379
解决:需要到springboot配置文件中配置一些相关参数去连接Redis
spring:
redis:
host: 192.168.1.1 #服务器地址 你服务器或本机地址
port: 6379 #连接端口
database: 0 #数据库索引,默认0
password: 123456 #密码
jedis:
pool:
max-active: 8 #连接池最大连接数(使用负值表示没有限制)
max-wait: -1 #最大阻塞等待时间(使用负值表示没有限制)
max-idle: 8 #最大空闲连接数
min-idle: 0 #最小空闲连接数
timeout: 5000 #连接超时时间(毫秒)
配置完这些参数即可使用
边栏推荐
- 知识点滴 - 关于苹果认证MFI
- 1、 Go knowledge check and remedy + practical course notes youth training camp notes
- A concurrent rule verification implementation
- 外包干了三年,废了...
- Detailed explanation of uboot image generation process of Hisilicon chip (hi3516dv300)
- 微信小程序中使用wx.showToast()进行界面交互
- Stockage et pratique des données en langage C (haut niveau)
- Wx is used in wechat applet Showtoast() for interface interaction
- Gslx680 touch screen driver source code analysis (gslx680. C)
- Detailed explanation of neo4j installation process
猜你喜欢
Kbu1510-asemi power supply special 15A rectifier bridge kbu1510
【webrtc】m98 screen和window采集
面试官:你都了解哪些开发模型?
ASEMI整流桥RS210参数,RS210规格,RS210封装
Summary of customer value model (RFM) technology for data analysis
【leetcode】1020. Number of enclaves
Resource create package method
我理想的软件测试人员发展状态
leetcode:105. Constructing binary trees from preorder and inorder traversal sequences
Interviewer: what development models do you know?
随机推荐
聊聊异步编程的 7 种实现方式
leanote私有云笔记搭建
【云原生】内存数据库如何发挥内存优势
【webrtc】m98 screen和window采集
UWB learning 1
Solution: could not find kf5 (missing: coreaddons dbusaddons doctools xmlgui)
Solve could not find or load the QT platform plugin "xcb" in "
【leetcode】1020. Number of enclaves
Mysql高低版本切换需要修改的配置5-8(此处以aicode为例)
Blue Bridge Cup Netizen age (violence)
Outsourcing for four years, abandoned
[webrtc] m98 Screen and Window Collection
2、 Concurrent and test notes youth training camp notes
95后CV工程师晒出工资单,狠补了这个,真香...
Weibo publishing cases
4、 High performance go language release optimization and landing practice youth training camp notes
【obs】win-capture需要winrt
ASEMI整流桥RS210参数,RS210规格,RS210封装
Detailed explanation of neo4j installation process
pytorch 参数初始化