{"id":28450445,"url":"https://github.com/houbb/redis-config","last_synced_at":"2026-03-10T10:02:37.985Z","repository":{"id":296535344,"uuid":"499435977","full_name":"houbb/redis-config","owner":"houbb","description":"redis config, support common types. (Redis config 配置，兼容常见的各种配置形式)","archived":false,"fork":false,"pushed_at":"2025-05-31T12:14:48.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T20:25:54.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/houbb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-03T08:27:16.000Z","updated_at":"2025-06-01T15:29:22.000Z","dependencies_parsed_at":"2025-05-31T23:24:33.843Z","dependency_job_id":"137fecae-a389-4bb2-a0ff-341663826cb2","html_url":"https://github.com/houbb/redis-config","commit_stats":null,"previous_names":["houbb/redis-config"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/houbb/redis-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fredis-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fredis-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fredis-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fredis-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houbb","download_url":"https://codeload.github.com/houbb/redis-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fredis-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30329697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-06T15:07:29.649Z","updated_at":"2026-03-10T10:02:37.966Z","avatar_url":"https://github.com/houbb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redis-config\n\n[redis-config](https://github.com/houbb/redis-config) redis 配置的简单整合实现。\n\n[![Build Status](https://travis-ci.com/houbb/redis-config.svg?branch=master)](https://travis-ci.com/houbb/redis-config)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.houbb/redis-config/badge.svg)](http://mvnrepository.com/artifact/com.github.houbb/redis-config)\n[![](https://img.shields.io/badge/license-Apache2-FF0080.svg)](https://github.com/houbb/redis-config/blob/master/LICENSE.txt)\n[![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/houbb/redis-config)\n\n## 创作目的\n\nredis 的配置比较多样，每次都是重复拷贝，缺少统一规范。\n\n## 特性\n\n- jedis 整合\n\n- jedis pool 整合\n\n- spring 整合\n\n- springboot 整合\n\n## 变更日志\n\n\u003e [变更日志](https://github.com/houbb/redis-config/blob/master/CHANGELOG.md)\n\n# 快速开始\n\n## 引入\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.houbb\u003c/groupId\u003e\n    \u003cartifactId\u003eredis-config-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.5.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 使用\n\n### 初始化\n\n```java\nIRedisService redisService = JedisRedisServiceFactory.simple(\"127.0.0.1\", 6379);\n```\n\n或者下面的池化方式：\n\n```java\nIRedisService redisService = JedisRedisServiceFactory.pooled(\"127.0.0.1\", 6379);\n```\n\n### 使用\n\n```java\n//1. 设置\nfinal String key = \"key\";\nfinal String value = \"123456\";\nredisService.set(key, value);\n\n//2. 获取\nAssert.assertEquals(\"123456\", redisService.get(key));\n\n//3. 过期\nredisService.expire(key, 100, TimeUnit.SECONDS);\n\n//4. 删除\nredisService.remove(key);\nAssert.assertNull(redisService.get(key));\n```\n\n# spring 整合\n\n## maven 引入\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.houbb\u003c/groupId\u003e\n    \u003cartifactId\u003eredis-config-spring\u003c/artifactId\u003e\n    \u003cversion\u003e1.5.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 代码配置\n\n指定 `@EnableRedisConfig` 注解即可。\n\n```java\n@Configurable\n@ComponentScan(basePackages = \"com.github.houbb.redis.config.test.service\")\n@EnableRedisConfig\npublic class SpringConfig {\n}\n```\n\n## 配置说明\n\n| 配置 | 说明 | 默认值\n|:---|:---|:----|\n| redis.address | redis 地址 | 127.0.0.1 |\n| redis.port | redis 端口 | 6379 |\n| redis.password | redis 密码 | |\n\n## 使用入门\n\n直接注入 `SpringRedisService` 即可正常使用。\n\n```java\n@ContextConfiguration(classes = SpringConfig.class)\n@RunWith(SpringJUnit4ClassRunner.class)\npublic class SpringServiceTest {\n\n    @Autowired\n    private UserService userService;\n\n    @Autowired\n    private SpringRedisService redisService;\n\n    @Test\n    public void queryLogTest() {\n        final String key = \"name\";\n        final String value = userService.queryUserName(1L);\n\n        redisService.set(key, value);\n        //2. 获取\n        Assert.assertEquals(value, redisService.get(key));\n        //3. 过期\n        redisService.expire(key, 100, TimeUnit.SECONDS);\n        //4. 删除\n        redisService.remove(key);\n        Assert.assertNull(redisService.get(key));\n    }\n\n}\n```\n\n# springboot 自动整合\n\n## maven 引入\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.houbb\u003c/groupId\u003e\n    \u003cartifactId\u003eredis-config-springboot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e1.5.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 使用 \n\n同 spring\n\n# Road-Map\n\n- [ ] Redisson 整合\n\n- [ ] 更多 service 方法\n\n## 开源矩阵\n\n下面是一些缓存系列的开源矩阵规划。\n\n| 名称 | 介绍 | 状态  |\n|:---|:---|:----|\n| [resubmit](https://github.com/houbb/resubmit) | 防止重复提交核心库 | 已开源 |\n| [rate-limit](https://github.com/houbb/rate-limit) | 限流核心库 | 已开源 |\n| [cache](https://github.com/houbb/cache) | 手写渐进式 redis | 已开源 |\n| [lock](https://github.com/houbb/lock) | 开箱即用的分布式锁 | 已开源 |\n| [common-cache](https://github.com/houbb/common-cache) | 通用缓存标准定义 | 已开源 |\n| [redis-config](https://github.com/houbb/redis-config) | 兼容各种常见的 redis 配置模式 | 已开源 |\n| [quota-server](https://github.com/houbb/quota-server) | 限额限次核心服务 | 待开始 |\n| [quota-admin](https://github.com/houbb/quota-admin) | 限额限次控台 | 待开始 |\n| [flow-control-server](https://github.com/houbb/flow-control-server) | 流控核心服务 | 待开始 |\n| [flow-control-admin](https://github.com/houbb/flow-control-admin) | 流控控台 | 待开始 |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Fredis-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoubb%2Fredis-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Fredis-config/lists"}