{"id":24839168,"url":"https://github.com/ayushkhodankar/openfeignclient","last_synced_at":"2025-03-26T04:32:27.126Z","repository":{"id":271553664,"uuid":"913817990","full_name":"Ayushkhodankar/OpenFeignClient","owner":"Ayushkhodankar","description":"Feign makes writing java http clients easier","archived":false,"fork":false,"pushed_at":"2025-01-08T12:53:31.000Z","size":39417,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:37:45.112Z","etag":null,"topics":["java17","openfeign","springcloud"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ayushkhodankar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-08T12:11:57.000Z","updated_at":"2025-01-08T12:53:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"aadb7ab0-a8d6-4610-ae48-5ab9144d1d94","html_url":"https://github.com/Ayushkhodankar/OpenFeignClient","commit_stats":null,"previous_names":["ayushkhodankar/openfeignclient"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushkhodankar%2FOpenFeignClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushkhodankar%2FOpenFeignClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushkhodankar%2FOpenFeignClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushkhodankar%2FOpenFeignClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayushkhodankar","download_url":"https://codeload.github.com/Ayushkhodankar/OpenFeignClient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589268,"owners_count":20640255,"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":["java17","openfeign","springcloud"],"created_at":"2025-01-31T06:36:53.353Z","updated_at":"2025-03-26T04:32:27.122Z","avatar_url":"https://github.com/Ayushkhodankar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFeign: A Declarative REST Client\n\nOpenFeign is an open-source project initially developed by Netflix and now maintained by the open-source community. It simplifies the process of writing web services by providing a declarative approach to REST API consumption using the `FeignClient` interface.\n\n## Features\n- **Declarative REST Client:** Write cleaner and more maintainable code by declaring interfaces.\n- **Integration Friendly:** Ideal for consuming third-party APIs and microservice endpoints.\n- **Dynamic Implementation:** Automatically creates dynamic implementations for declared `FeignClient` interfaces.\n\n## Dependencies\nTo use OpenFeign in your project, add the following dependency to your `pom.xml` file:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.cloud\u003c/groupId\u003e\n    \u003cartifactId\u003espring-cloud-starter-openfeign\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\n## Project Overview\nThis project demonstrates the use of OpenFeign in a microservice architecture with the following components:\n\n### Microservices\n1. **Employee Service**\n    - Manages employee-related data and operations.\n2. **Address Service**\n    - Handles address-related information for employees.\n\n## Getting Started\n### Prerequisites\n- Java Development Kit (JDK 8 or above)\n- Maven\n- Spring Boot\n\n### Steps to Run the Project\n1. Clone this repository.\n2. Navigate to each service directory and build the project using:\n    ```bash\n    mvn clean install\n    ```\n3. Run each service using:\n    ```bash\n    mvn spring-boot:run\n    ```\n4. Test the endpoints using tools like Postman or cURL.\n\n## How OpenFeign Works\n1. Declare a `@FeignClient` interface with the desired REST API endpoints.\n2. OpenFeign dynamically generates the implementation at runtime.\n3. Use the client as a Spring Bean in your services to make API calls effortlessly.\n\n### Example `FeignClient` Declaration\n```java\n@FeignClient(name = \"address-service\", url = \"http://localhost:8081\")\npublic interface AddressClient {\n    @GetMapping(\"/addresses/{id}\")\n    Address getAddressById(@PathVariable(\"id\") Long id);\n}\n```\n\n### Benefits\n- Reduces boilerplate code for REST API calls.\n- Simplifies integration between microservices.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n---\nDeveloped with ❤️ for simplifying microservice communication.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushkhodankar%2Fopenfeignclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayushkhodankar%2Fopenfeignclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushkhodankar%2Fopenfeignclient/lists"}