# redis-spring-boot-starter **Repository Path**: akslak/redis-spring-boot-starter ## Basic Information - **Project Name**: redis-spring-boot-starter - **Description**: redis操作及分布式锁封装 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-06 - **Last Updated**: 2026-07-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README <<<<<<< HEAD # redis-spring-boot-starter #### 介绍 redis操作及分布式锁封装 #### 配置 ```yml redis: # 开启自动装配  enable: true  # 主机  host: 192.168.1.201  # 端口  port: 6379  #超时时间,默认为2000毫秒  timeout: 2000  # 用户名  username: admin  #密码  password: admin  #选用的库,默认0库  database: 0  #客户端名称,用于actuator显示  client-name: redis  # 连接池信息  pool:   max-active: 20   max-idle: 100   max-wait: 1000   max-total: 1500   # 获取连接时检查连接是否可用   test-on-borrow: true   # 释放连接时检查连接是否可用   test-on-return: true ``` #### 核心接口 ```java 1.单服务使用的redis锁(键、值、过期时间、重试最大时间) Boolean singleLockSet(key, value, expireSeconds, tryTimeoutSeconds); 2.获取分布式锁(Lua脚本) Boolean getLock(key, requestId, expireSeconds); 3.释放分布式锁(Lua脚本) Boolean releaseLock(key, requestId); ``` #### 使用说明 ```java 1.安装至本地 mvn clean install 2.引入坐标 ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) ======= 介绍 整合RedisTemplate与StringRedisTemplate,开箱即用,提供更友好更完善的API,更方便的调用,支持Jedis、Lettuce、Redisson等主流客户端,并且在非集群模式下支持分片操作 >>>>>>> 28f1ada (redis-spring-boot-starter 2023.08.05 基础环境搭建)