{"id":21926659,"url":"https://github.com/aatarasoff/spring-thrift-starter","last_synced_at":"2026-03-02T06:31:31.780Z","repository":{"id":1651818,"uuid":"42074373","full_name":"aatarasoff/spring-thrift-starter","owner":"aatarasoff","description":"Set of cool annotations that helps you building Thrift applications with Spring Boot","archived":false,"fork":false,"pushed_at":"2022-05-26T16:57:42.000Z","size":437,"stargazers_count":163,"open_issues_count":2,"forks_count":67,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-10T02:54:12.042Z","etag":null,"topics":["spring","spring-boot","spring-cloud","spring-cloud-starter","thrift"],"latest_commit_sha":null,"homepage":"","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/aatarasoff.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}},"created_at":"2015-09-07T21:01:07.000Z","updated_at":"2025-03-31T20:08:24.000Z","dependencies_parsed_at":"2022-09-20T10:55:36.299Z","dependency_job_id":null,"html_url":"https://github.com/aatarasoff/spring-thrift-starter","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/aatarasoff/spring-thrift-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fspring-thrift-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fspring-thrift-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fspring-thrift-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fspring-thrift-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aatarasoff","download_url":"https://codeload.github.com/aatarasoff/spring-thrift-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fspring-thrift-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29994122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","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":["spring","spring-boot","spring-cloud","spring-cloud-starter","thrift"],"created_at":"2024-11-28T22:09:58.428Z","updated_at":"2026-03-02T06:31:31.739Z","avatar_url":"https://github.com/aatarasoff.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Thrift Starter for Spring Boot\n\n[![Join the chat at https://gitter.im/aatarasoff/spring-thrift-starter](https://badges.gitter.im/aatarasoff/spring-thrift-starter.svg)](https://gitter.im/aatarasoff/spring-thrift-starter?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![Build Status](https://travis-ci.org/aatarasoff/spring-thrift-starter.svg?branch=master)](https://travis-ci.org/aatarasoff/spring-thrift-starter)\n\nSet of cool annotations that helps you building Thrift applications with Spring Boot.\n\n## How to connect the project\n```groovy\nrepositories {\n    ...\n    maven {\n        url = uri(\"https://maven.pkg.github.com/aatarasoff/spring-thrift-starter\")\n        credentials {\n            username = System.getenv(\"USERNAME\")\n            password = System.getenv(\"TOKEN\")\n        }\n    }\n}\n\ncompile 'info.developerblog.spring.thrift:spring-thrift-starter:+'\n```\n\nFor more information, please, look the official github packages [documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package).\n\n## How to use this\n\n### Server-side\nAnnotation @ThriftController(\"servlet_path\") helps you building server controller for request processing\n\n```java\n@ThriftController(\"/api\")\npublic class TGreetingServiceController implements TGreetingService.Iface {\n\n    @Override\n    public String greet(TName name) throws TException {\n        // your logic\n    }\n}\n```\n### Client-side\n\n#### @ThriftClient\n\n@ThriftClient(serviceId = \"registered_service\", (path) = \"server_handler_path\") helps you with multithreaded client with full Spring Cloud support.\n```java\n@ThriftClient(serviceId = \"greeting-service\", path = \"/api\")\nTGreetingService.Client client;\n```\n\n#### Beans\nThrift clients can also be used as regular beans \n\n(which can be configured through [app properties](#thrift-client-configuration))\n\n```java\nclass Service {\n    @Autowired\n    private TGreetingService.Client client;\n}\n```\n\n\n```java\nclass Service {\n    private final TGreetingService.Client client;\n    @Autowired\n    public Service(TGreetingService.Client client) {\n        this.client = client;\n    }\n}\n```\n\n#### @ThriftClientsMap\n\n@ThriftClientsMap(mapperClass) annotation helps to create a string-keyed map of clients for a set of services having the same interface, allowing to define the concrete callee instance at runtime:\n```java\n@ThriftClientsMap(mapperClass = SampleMapper.class)\nMap\u003cString, TGreetingService.Client\u003e clientsMap;\n```\nMapper class requirements:\n* must extend AbstractThriftClientKeyMapper\n* must be registered as a bean in the application context\n\n#### Thrift Client configuration\n\n```yaml\ngreeting-service:                     #service name\n  endpoint: http://localhost:8080/api #direct endpoint\n  ribbon:                             #manually ribbon\n      listOfServers: localhost:8080\n  path: /service                      #general path\n  connectTimeout: 1000                #default=1000\n  readTimeout: 10000                  #default=30000\n\nthrift.client.max.threads: 10         #default=8\n```\n\nIf you use service discovery backend (as Eureka or Consul) only path maybe needed.\n\nSee tests for better understanding.\n\n### Sleuth support\nSince 1.0.0 starter have supported [Spring Cloud Sleuth](https://cloud.spring.io/spring-cloud-sleuth) for tracing.\n\n## Special thanks to\n\n* [@bsideup](https://github.com/bsideup) who inspired me with his [project](https://github.com/bsideup/thrift-spring-boot-starter)\n* [@lavcraft](https://github.com/lavcraft) who was helping me when I've been stucked\n* [@driver733](https://github.com/driver733) for implementing the [bean registration support](#beans)\n\n## Enjoy!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatarasoff%2Fspring-thrift-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faatarasoff%2Fspring-thrift-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatarasoff%2Fspring-thrift-starter/lists"}