{"id":13635484,"url":"https://github.com/houbb/sisyphus","last_synced_at":"2025-04-06T12:08:57.039Z","repository":{"id":37723039,"uuid":"187297587","full_name":"houbb/sisyphus","owner":"houbb","description":"The java retry framework.(支持注解的 java 重试框架)","archived":false,"fork":false,"pushed_at":"2024-02-02T22:07:18.000Z","size":256,"stargazers_count":184,"open_issues_count":5,"forks_count":68,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T10:08:38.238Z","etag":null,"topics":["gauva","guava-retrying","java-retry","retry","spring-retry"],"latest_commit_sha":null,"homepage":"https://sisyphus-doc.github.io/","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":null,"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}},"created_at":"2019-05-18T00:43:35.000Z","updated_at":"2025-03-05T10:57:22.000Z","dependencies_parsed_at":"2024-08-02T00:02:54.012Z","dependency_job_id":"7dcae204-217d-4410-9376-9042a1a2616e","html_url":"https://github.com/houbb/sisyphus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fsisyphus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fsisyphus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fsisyphus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Fsisyphus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houbb","download_url":"https://codeload.github.com/houbb/sisyphus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gauva","guava-retrying","java-retry","retry","spring-retry"],"created_at":"2024-08-02T00:00:46.204Z","updated_at":"2025-04-06T12:08:57.012Z","avatar_url":"https://github.com/houbb.png","language":"Java","funding_links":[],"categories":["Java","测试","容错组件"],"sub_categories":["客户端"],"readme":"# Sisyphus \n\n[Sisyphus](https://github.com/houbb/sisyphus) 是支持过程式编程和注解编程的 java 重试框架。\n\n[![Build Status](https://www.travis-ci.org/houbb/sisyphus.svg?branch=master)](https://www.travis-ci.org/houbb/sisyphus?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.houbb/sisyphus/badge.svg)](http://mvnrepository.com/artifact/com.github.houbb/sisyphus)\n[![](https://img.shields.io/badge/license-Apache2-FF0080.svg)](https://github.com/houbb/sisyphus/blob/master/LICENSE.txt)\n[![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/houbb/sisyphus)\n\n![sisyphus.jpg](sisyphus.jpg)\n\n## 特性\n\n- 支持 fluent 过程式编程\n\n- 基于字节码的代理重试\n\n- 基于注解的重试，允许自定义注解\n\n- 无缝接入 spring\n\n- 无缝接入 spring-boot\n\n- 接口与注解的统一\n\n- 解决 spring-retry 与 guava-retrying 中的不足之处\n\n### v0.1.0 变更\n\n- Recover 上下文增加入参，更加便于业务处理\n\n### 更新记录\n\n\u003e [更新记录](doc/CHANGE_LOG.md)\n\n## 设计目的\n\n综合了 spring-retry 和 gauva-retrying 的优势。\n\n调整一些特性，使其更利于实际使用。\n\n采用 Netty 类似的接口思想，保证接口的一致性，和替换的灵活性。\n\n借鉴 Hibernate-Validator 的设计，允许用户自定义注解。\n\n\u003e [spring-retry 与 guava-retrying 中的不足之处](https://juejin.cn/post/7020767222687612964)\n\n## 开源地址\n\n\u003e [sisyphus](https://github.com/houbb/sisyphus)\n\n# 快速开始\n\n## 引入\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.houbb\u003c/groupId\u003e\n    \u003cartifactId\u003esisyphus-core\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 入门代码\n\n详情参见 [RetryerTest](https://github.com/houbb/sisyphus/blob/master/sisyphus-test/src/test/java/com/github/houbb/sispyhus/test/core/RetryerTest.java)\n\n```java\npublic void helloTest() {\n    Retryer.\u003cString\u003enewInstance()\n            .callable(new Callable\u003cString\u003e() {\n                @Override\n                public String call() throws Exception {\n                    System.out.println(\"called...\");\n                    throw new RuntimeException();\n                }\n            }).retryCall();\n}\n```\n\n## 代码分析\n\n- callable\n\n指定一个 callable 的实现。\n\n我们打印一条日志，并且模拟一个程序异常。\n\n## 日志信息\n\n日志信息\n\n```\ncalled...\ncalled...\ncalled...\n```\n\n和一些其他异常信息。\n\n重试触发的条件，默认是程序发生了异常\n\n这里的重试间隔默认为没有时间间隔，一共尝试3次。（包括第一次程序本身执行）\n\n\n# 拓展阅读\n\n[00-sisyphus 是什么](doc/user/00-what-is-sisyphus.md)\n\n[01-为什么选择 sisyphus](doc/user/01-why-sisyphus.md)\n\n[02-sisyphus 模块简介](doc/user/02-sisyphus-modules.md)\n\n[03-sisyphus 快速开始](doc/user/03-quick-start.md)\n\n[04-sisyphus 配置概览](doc/user/04-config-overview.md)\n\n[05-sisyphus 注解简介](doc/user/05-annotation.md)\n\n[06-sisyphus 代理模板](doc/user/06-proxy-template.md)\n\n[07-sisyphus spring 整合](doc/user/07-spring-integration.md)\n\n[08-sisyphus springboot 整合](doc/user/08-springboot-integration.md)\n\n# 后期 Road-MAP\n\n- [ ] 丰富上下文信息\n\n- [ ] 丰富重试统计信息\n\n# 中间件等工具开源矩阵\n\n[heaven: 收集开发中常用的工具类](https://github.com/houbb/heaven)\n\n[rpc: 基于 netty4 实现的远程调用工具](https://github.com/houbb/rpc)\n\n[mq: 简易版 mq 实现](https://github.com/houbb/mq)\n\n[ioc: 模拟简易版 spring ioc](https://github.com/houbb/ioc)\n\n[mybatis: 简易版 mybatis](https://github.com/houbb/mybatis)\n\n[cache: 渐进式 redis 缓存](https://github.com/houbb/cache)\n\n[jdbc-pool: 数据库连接池实现](https://github.com/houbb/jdbc-pool)\n\n[sandglass: 任务调度时间工具框架](https://github.com/houbb/sandglass)\n\n[sisyphus: 支持注解的重试框架](https://github.com/houbb/sisyphus)\n\n[resubmit: 防止重复提交框架，支持注解](https://github.com/houbb/resubmit)\n\n[auto-log: 日志自动输出](https://github.com/houbb/auto-log)\n\n[async: 多线程异步并行框架](https://github.com/houbb/async)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Fsisyphus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoubb%2Fsisyphus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Fsisyphus/lists"}