Chinaunix首页 | 论坛 | 博客
  • 博客访问: 545609
  • 博文数量: 298
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 3077
  • 用 户 组: 普通用户
  • 注册时间: 2019-06-17 10:57
文章分类

全部博文(298)

文章存档

2022年(96)

2021年(201)

2019年(1)

我的朋友

分类: Java

2021-06-11 10:18:41


 1. 配置密码,找到 redis.windows.conf 配置文件

点击(此处)折叠或打开

  1. # Require clients to issue AUTH <PASSWORD> before processing any other
  2. # commands. This might be useful in environments in which you do not trust
  3. # others with access to the host running redis-server.
  4. #
  5. # This should stay commented out for backward compatibility and because most
  6. # people do not need auth (e.g. they run their own servers).
  7. #
  8. # Warning: since Redis is pretty fast an outside user can try up to
  9. # 150k passwords per second against a good box. This means that you should
  10. # use a very strong password otherwise it will be very easy to break.
  11. #

  12. #这里配置密码,密码root(fhadmin org)
  13. requirepass root

  14. # Command renaming.
  15. #
  16. # It is possible to change the name of dangerous commands in a shared
  17. # environment. For instance the CONFIG command may be renamed into something
  18. # hard to guess so that it will still be available for internal-use tools
  19. # but not available for general clients.


2.制作启动脚本。用写字本编辑后,保存为bat格式

redis-server.exe  redis.windows.conf

3. java springboot 链接 redis

点击(此处)折叠或打开

  1. #===========Redis配置====fhadmin org=======
  2. # Redis数据库索引(默认为0)
  3. spring.redis.database=0
  4. # Redis服务器地址
  5. spring.redis.host=127.0.0.1
  6. # Redis服务器连接端口
  7. spring.redis.port=6379
  8. # Redis服务器连接密码(默认为空)
  9. spring.redis.password=root
  10. # 连接池最大连接数(使用负值表示没有限制)
  11. spring.redis.pool.max-active=200
  12. # 连接池最大阻塞等待时间(使用负值表示没有限制)
  13. spring.redis.pool.max-wait=-1
  14. # 连接池中的最大空闲连接
  15. spring.redis.pool.max-idle=10
  16. # 连接池中的最小空闲连接
  17. spring.redis.pool.min-idle=0
  18. # 连接超时时间(毫秒)
  19. spring.redis.timeout=2000ms
  20. spring.redis.jedis.pool.max-wait=-1ms
  21. #===========Redis配置====fhadmin org=======



阅读(1703) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~