{"id":26284138,"url":"https://github.com/abilng/retrofit-spring-boot-starter","last_synced_at":"2026-04-24T08:32:36.179Z","repository":{"id":280995510,"uuid":"911524086","full_name":"abilng/retrofit-spring-boot-starter","owner":"abilng","description":"Spring Auto-config for Retrofit2 with resilience4j","archived":false,"fork":false,"pushed_at":"2025-05-27T04:23:23.000Z","size":110,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T04:22:29.399Z","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/abilng.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-03T08:11:36.000Z","updated_at":"2025-10-25T03:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ceafdf87-9cc7-46bb-a191-a118b11910f7","html_url":"https://github.com/abilng/retrofit-spring-boot-starter","commit_stats":null,"previous_names":["abilng/retrofit-spring-boot-starter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abilng/retrofit-spring-boot-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilng%2Fretrofit-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilng%2Fretrofit-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilng%2Fretrofit-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilng%2Fretrofit-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abilng","download_url":"https://codeload.github.com/abilng/retrofit-spring-boot-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilng%2Fretrofit-spring-boot-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32216229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T08:24:32.376Z","status":"ssl_error","status_checked_at":"2026-04-24T08:24:26.731Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-03-14T18:30:04.009Z","updated_at":"2026-04-24T08:32:36.174Z","avatar_url":"https://github.com/abilng.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Retrofit Spring Boot Auto Configuration\n\nRetrofit 2 is just a simple abstraction for http request. The backend of its to perform http\nrequest is mainly depends on `okhttp3`. We also support async http request out of the box.\n\n### Dependency\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ein.abilng.spring\u003c/groupId\u003e\n    \u003cartifactId\u003eretrofit-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e${latest_version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor Gradle:\n\n```kotlin\nimplementation(\"in.abilng.spring:retrofit-spring-boot-starter:${latest_version}\")\n```\n\n**Note**: To enable circuit breaker \u0026 retry metrics, you need add following along with `retrofit-spring-boot-starter`\n\n```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-actuator\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.github.resilience4j\u003c/groupId\u003e\n            \u003cartifactId\u003eresilience4j-spring-boot3\u003c/artifactId\u003e\n            \u003cversion\u003e2.2.0\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.github.resilience4j\u003c/groupId\u003e\n            \u003cartifactId\u003eresilience4j-spring-boot3\u003c/artifactId\u003e\n            \u003cversion\u003e2.2.0\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.github.resilience4j\u003c/groupId\u003e\n            \u003cartifactId\u003eresilience4j-micrometer\u003c/artifactId\u003e\n            \u003cversion\u003e2.2.0\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.micrometer\u003c/groupId\u003e\n            \u003cartifactId\u003emicrometer-registry-prometheus\u003c/artifactId\u003e \u003c!-- or any other implementations  of micrometer --\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\n```\nor Gradle:\n```kotlin\nimplmenation(\"org.springframework.boot:spring-boot-starter-actuator\")\nimplmenation(\"io.github.resilience4j:resilience4j-spring-boot3:2.2.0\")\nimplmenation(\"io.github.resilience4j:resilience4j-micrometer:2.2.0\")\nimplmenation(\"io.micrometer:micrometer-registry-prometheus\") // or other implementations of micrometer\n```\n\n\n### Detailed Usage in Springboot Application\n\nAll the customize retrofit interface should be annotated with `@Retrofit` annotation,\nthat would make these interface could be registed our own bean creation process. e.g.:\n\n```java\n@Retrofit(\"open-library\")\npublic interface IOpenLibClient {\n    \n    @GET(\"/search.json\")\n    Call\u003cSearchResult\u003e search(@Query(\"title\") String title,\n                              @Query(\"limit\") Integer limit);\n    //...\n\n}\n```\n\n`@Retrofit` have three properties, the `name` or `value` stand for the identity of the retrofit configuration\nthat your would like to use (It would be clarified in configuration file part). `qualifier` attribute means the spring's\nbean name.\nIf no attributes provided, we set `${name}RetrofitClient` as the bean name.\n\nIn you `application.{propeties|yaml}` set the configuration needed to send http request. \n\nFor Example, following properties can be used to configure `open-library`\n```properties\n\nretrofit.services.open-library.base-url=https://openlibrary.org/ #The system prefix url\nretrofit.services.open-library.connection.read-timeout=10000\nretrofit.services.open-library.connection.write-timeout=10000\nretrofit.services.open-library.connection.connect-timeout=10000\n\n```\n\nYou can now `@Autowired` the retrofit interface to send real http request. e.g.:\n\n```java\n@Autowired\nprivate final IOpenLibClient endpoint;\n\n```\n\n### Features\n\n- [X] Retry\n- [X] Circuit Breaker\n- [X] Micrometer Metrics\n- [X] Auth Header Propagation (when `propagate-auth-header=true`)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabilng%2Fretrofit-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabilng%2Fretrofit-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabilng%2Fretrofit-spring-boot-starter/lists"}