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

配置完这些参数即可使用
边栏推荐
- 图解GPT3的工作原理
- idea添加类注释模板和方法模板
- Implementing data dictionary with JSP custom tag
- Dynamics CRM server deployment - restore database prompt: the database is in use
- C language (high-level) data storage + Practice
- 【p2p】本地抓包
- Idea add class annotation template and method template
- CentOS7下安装PostgreSQL11数据库
- 为什么要了解现货黄金走势?
- Asemi rectifier bridge rs210 parameters, rs210 specifications, rs210 package
猜你喜欢

【webrtc】m98 screen和window采集

Dynamics CRM server deployment - restore database prompt: the database is in use

Wechat applet full stack development practice Chapter 3 Introduction and use of APIs commonly used in wechat applet development -- 3.10 tabbar component (I) how to open and use the default tabbar comp

My ideal software tester development status

抽絲剝繭C語言(高階)數據的儲存+練習

Example of Pushlet using handle of Pushlet

Leetcode-206. Reverse Linked List

Is the test cycle compressed? Teach you 9 ways to deal with it

【webrtc】m98 screen和window采集

测试周期被压缩?教你9个方法去应对
随机推荐
[ANSYS] learning experience of APDL finite element analysis
《动手学深度学习》(四) -- 卷积神经网络 CNN
Outsourcing for four years, abandoned
@component(““)
外包幹了三年,廢了...
Mutual conversion between InputStream, int, shot, long and byte arrays
Technology cloud report: from robot to Cobot, human-computer integration is creating an era
【leetcode】1020. Number of enclaves
3、 High quality programming and performance tuning practical youth training camp notes
How to reduce inventory with high concurrency on the Internet
深度学习花书+机器学习西瓜书电子版我找到了
Build personal website based on flask
vus. Precautions for SSR requesting data in asyndata function
C language (high-level) data storage + Practice
通信设备商,到底有哪些岗位?
Resource create package method
Implementing data dictionary with JSP custom tag
resource 创建包方式
pytorch 参数初始化
Summary of customer value model (RFM) technology for data analysis