{"id":31939750,"url":"https://github.com/alibaba/easy-retry","last_synced_at":"2025-10-14T08:46:05.793Z","repository":{"id":42329419,"uuid":"337033784","full_name":"alibaba/easy-retry","owner":"alibaba","description":"easy-retry","archived":false,"fork":false,"pushed_at":"2024-12-27T06:39:03.000Z","size":328,"stargazers_count":186,"open_issues_count":3,"forks_count":46,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-09T19:11:26.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alibaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-02-08T10:10:53.000Z","updated_at":"2025-04-26T22:13:38.000Z","dependencies_parsed_at":"2024-08-29T04:03:03.500Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/easy-retry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alibaba/easy-retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Feasy-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Feasy-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Feasy-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Feasy-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/easy-retry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Feasy-retry/sbom","scorecard":{"id":183656,"data":{"date":"2025-08-11","repo":{"name":"github.com/alibaba/easy-retry","commit":"86b831c436bcf95bc5c6e671f2c3ea2fa1c3f613"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":5,"reason":"Found 4/8 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/alibaba/easy-retry/maven.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/alibaba/easy-retry/maven.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-pv7h-hx5h-mgfj","Warn: Project is vulnerable to: GHSA-36p3-wjmg-h94x","Warn: Project is vulnerable to: GHSA-hh26-6xwr-ggv7","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-g5mm-vmx4-3rg7","Warn: Project is vulnerable to: GHSA-558x-2xjg-6232","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8","Warn: Project is vulnerable to: GHSA-rc42-6c7j-7h5r","Warn: Project is vulnerable to: GHSA-xf96-w227-r7c4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T19:21:44.326Z","repository_id":42329419,"created_at":"2025-08-16T19:21:44.326Z","updated_at":"2025-08-16T19:21:44.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018299,"owners_count":26086345,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-14T08:46:03.706Z","updated_at":"2025-10-14T08:46:05.787Z","avatar_url":"https://github.com/alibaba.png","language":"Java","funding_links":[],"categories":["容错组件"],"sub_categories":[],"readme":"# Easy-Retry\n\n一种存储介质可扩展的持久化重试方案\n![img](img/readme/arch.jpg)\n\n### Getting started\n\n#### Memory Retry\n\n1. 增加pom依赖\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.alibaba\u003c/groupId\u003e\n    \u003cartifactId\u003eeasy-retry-memory-starter\u003c/artifactId\u003e\n    \u003cversion\u003e${last-version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n2. 在application.properties增加配置\n\n`spring.easyretry.memory.enabled = true`\n\n3. 在需要重试的方法上增加`@EasyRetryable`注解\n\n```java\npublic class MemoryUserService {\n    @EasyRetryable\n    public User getUserById(Long userId){\n        return new User();\n    }\n}\n```\n\n#### Mybatis Retry\n\n1. 增加pom依赖\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.alibaba\u003c/groupId\u003e\n    \u003cartifactId\u003eeasy-retry-mybatis-starter\u003c/artifactId\u003e\n    \u003cversion\u003e${last-version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n2. 在application.properties增加配置\n\n`spring.easyretry.mybatis.enabled = true`\n\n3. 声明`javax.sql.DataSource`的`Bean`实例，参考下面例子（以`druid`连接池为例）\n```\n@Bean(name = \"easyRetryMybatisDataSource\", initMethod = \"init\", destroyMethod = \"close\")\npublic DataSource easyRetryMybatisDataSource() {\n    DruidDataSource tds = new DruidDataSource();\n    tds.setUrl(\"\");\n    tds.setUsername(\"\");\n    tds.setPassword(\"\");\n    ...\n    return tds;\n}\n```\n\n4. 新增持久化表\n\n```\nCREATE TABLE `easy_retry_task` (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',\n  `gmt_create` datetime NOT NULL COMMENT '创建时间',\n  `gmt_modified` datetime NOT NULL COMMENT '修改时间',\n  `sharding` varchar(64) DEFAULT NULL COMMENT '数据库分片字段',\n  `biz_id` varchar(64) DEFAULT NULL COMMENT '业务id',\n  `executor_name` varchar(512) NOT NULL COMMENT '执行名称',\n  `executor_method_name` varchar(512) NOT NULL COMMENT '执行方法名称',\n  `retry_status` tinyint(4) NOT NULL COMMENT '重试状态',\n  `args_str` varchar(7168) DEFAULT NULL COMMENT '执行方法参数',\n  `ext_attrs` varchar(3000) DEFAULT NULL COMMENT '扩展字段',\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='easy_retry_task'\n;\n```\n\n5. 在需要重试的方法上增加@EasyRetryable注解\n\n```java\npublic class MybatisUserService {\n    @EasyRetryable\n    public User getUserById(Long userId){\n        return new User();\n    }\n}\n```\n\n### Built With\n\n• JDK1.8\n\n• Spring Framework5+\n\n• Spring Boot2.4+\n\n• Maven3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Feasy-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Feasy-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Feasy-retry/lists"}