当前位置:网站首页>解决问题: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 #连接超时时间(毫秒)

配置完这些参数即可使用
边栏推荐
猜你喜欢
随机推荐
Weibo publishing cases
Implementing data dictionary with JSP custom tag
Convolutional neural network -- understanding of pooling
我理想的软件测试人员发展状态
Tongda injection 0day
pytorch 参数初始化
95后CV工程师晒出工资单,狠补了这个,真香...
图解GPT3的工作原理
How do I get the last part of a string- How to get the last part of a string?
通信设备商,到底有哪些岗位?
gslx680触摸屏驱动源码码分析(gslX680.c)
leetcode:105. Constructing binary trees from preorder and inorder traversal sequences
Interviewer: what development models do you know?
English translation is too difficult? I wrote two translation scripts with crawler in a rage
URP - shaders and materials - simple lit
【斯坦福计网CS144项目】Lab4: TCPConnection
The metauniverse of the platofarm farm continues to expand, with Dao governance as the core
About some details of final, I have something to say - learn about final CSDN creation clock out from the memory model
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
直播平台源码,可折叠式菜单栏
![[UTCTF2020]file header](/img/e3/818e2d531a06ab90de189055f634ad.png)








