{"id":29961405,"url":"https://github.com/beemi/spring-boot-webclient-example","last_synced_at":"2025-10-14T00:42:05.315Z","repository":{"id":226673724,"uuid":"769348700","full_name":"beemi/spring-boot-webclient-example","owner":"beemi","description":"Spring boot webclient example project","archived":false,"fork":false,"pushed_at":"2024-03-12T23:01:56.000Z","size":276,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T23:25:06.052Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beemi.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,"zenodo":null}},"created_at":"2024-03-08T21:31:33.000Z","updated_at":"2024-03-08T21:31:46.000Z","dependencies_parsed_at":"2024-03-12T19:51:18.121Z","dependency_job_id":"c6b1df20-4198-4289-a7e8-e8e898e3a879","html_url":"https://github.com/beemi/spring-boot-webclient-example","commit_stats":null,"previous_names":["beemi/spring-boot-webclient-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beemi/spring-boot-webclient-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2Fspring-boot-webclient-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2Fspring-boot-webclient-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2Fspring-boot-webclient-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2Fspring-boot-webclient-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beemi","download_url":"https://codeload.github.com/beemi/spring-boot-webclient-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2Fspring-boot-webclient-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017362,"owners_count":26086052,"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-13T02:00:06.723Z","response_time":61,"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-08-03T23:10:44.048Z","updated_at":"2025-10-14T00:42:05.298Z","avatar_url":"https://github.com/beemi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot WebClient Example 🚀\n\n[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.5.5-6DB33F?style=for-the-badge\u0026logo=spring)](https://spring.io/projects/spring-boot)\n[![Java](https://img.shields.io/badge/Java-17-ED8B00?style=for-the-badge\u0026logo=java)](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html)\n[![Maven](https://img.shields.io/badge/Maven-3.8.2-C71A36?style=for-the-badge\u0026logo=apache-maven)](https://maven.apache.org/download.cgi)\n[![Postman](https://img.shields.io/badge/Postman-7.36.5-FF6C) ](https://www.postman.com/downloads/)\n[![Swagger](https://img.shields.io/badge/Swagger-3.0-85EA2D?style=for-the-badge\u0026logo=swagger)](https://swagger.io/)\n\nThis is a simple Spring Boot service that utilizes WebClient to call external APIs and return the responses.\n\n## 📋 Requirements\n\n- ☕ Java 17\n- 🏗️ Maven\n- 🐘 Spring Boot\n- 📬 Postman\n\n### Run the Application Locally\n\n```shell\n./mvnw spring-boot:run -Dspring-boot.run.profiles=local\n```\n\nThe application will be available at [http://localhost:8090](http://localhost:8090).\n\n### 📦 Create Jar File\n\n```shell\n./mvnw clean package -DskipTests\n```\n\n```Bash\n./mvnw clean install -Dspring-boot.run.profiles=local\n```\n\n_Note: If you want to set custom version, use `-Drevision=1.0.0`_\nExample:\n\n```shell\n./mvnw --batch-mode versions:set -DskipTests \\\n  -DnewVersion=1.0.0 \\\n  -DprocessAllModules \\\n  -DgenerateBackupPoms=false\n```\n\nRun the jar file:\n\n```shell\njava -jar target/webclients-spring-boot-example-0.0.1-SNAPSHOT.jar --spring.profiles.active=local\n```\n\n## :book: WebClient Configuration\n\nThis configuration class (`WebClientConfig`) sets up instances of WebClient to interact with external APIs. It provides\nmethods to create WebClient instances for different services, such as Star Wars API and Postcode.io API.\n\n### Configuration Properties\n\n- **starwars.api.base-url**: The base URL of the Star Wars API.\n- **postcodeIo.api.url**: The base URL of the Postcode.io API.\n\n### WebClient Instances\n\n#### postcodeIoWebClient\n\nThis bean creates a WebClient instance configured to interact with the Postcode.io API. It includes:\n\n- **Exchange Strategies**: Configured to handle large payloads efficiently.\n- **Default Headers**: Sets the content type to JSON.\n- **Logging Filters**: Log outgoing requests and incoming responses for debugging purposes.\n\n#### starWarsWebClient\n\nThis bean creates a WebClient instance configured to interact with the Star Wars API. It includes:\n\n- **Exchange Strategies**: Configured to handle large payloads efficiently.\n- **Default Headers**: Sets the content type to JSON.\n- **Logging Filters**: Log outgoing requests and incoming responses for debugging purposes.\n\n### Logging\n\nThe logging filters in this configuration class log the details of outgoing requests and incoming responses at INFO\nlevel, providing insights into the interactions with external APIs. This aids in troubleshooting and monitoring API\ncalls.\n\n### Usage\n\nTo use these WebClient instances in your application, simply inject them as dependencies where needed. For example:\n\n```java\n\n@Autowired\n@Qualifier(\"starWarsWebClient\")\nprivate WebClient starWarsWebClient;\n\n@Autowired\n@Qualifier(\"postcodeIoWebClient\")\nprivate WebClient postcodeIoWebClient;\n```\n\nThen, you can use these WebClient instances to make requests to the respective APIs in your application logic.\n\n### 📖 Swagger API Documentation\n\n🔍 Access the OpenAPI documentation to explore and test the API endpoints:\n\n[![Swagger API Documentation](https://img.shields.io/badge/Swagger-UI-85EA2D?style=for-the-badge\u0026logo=swagger)](http://localhost:8090/swagger-ui.html)\n\n[![OpenAPI Docs](https://img.shields.io/badge/OpenAPI-Docs-85EA2D?style=for-the-badge\u0026logo=swagger)](http://localhost:8090/v3/api-docs)\n\n### Actuator Info Endpoint :thumbsup:\n\nExpose management endpoints to monitor and manage your application:\n\n- [Actuator Info](http://localhost:8090/mgmt/actuator)\n- [Health](http://localhost:8090/mgmt/actuator/health)\n- [Liveness](http://localhost:8090/mgmt/actuator/health/liveness)\n- [Readiness](http://localhost:8090/mgmt/actuator/health/readiness)\n- [Prometheus](http://localhost:8090/mgmt/actuator/prometheus)\n\n### Contact Information 📧\n\nIf you have any questions, please feel free to reach out to me at [beemi.raja@gmail.com](beemi.raja@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeemi%2Fspring-boot-webclient-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeemi%2Fspring-boot-webclient-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeemi%2Fspring-boot-webclient-example/lists"}