{"id":15638136,"url":"https://github.com/wendelladriel/spring-microservices","last_synced_at":"2025-04-15T17:38:49.487Z","repository":{"id":27124630,"uuid":"112597528","full_name":"WendellAdriel/spring-microservices","owner":"WendellAdriel","description":"Example of a microservice architecture using Spring Cloud","archived":false,"fork":false,"pushed_at":"2022-03-21T10:38:22.000Z","size":22,"stargazers_count":97,"open_issues_count":0,"forks_count":44,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T23:11:12.925Z","etag":null,"topics":["architecture","boilerplate","docker","eureka","example","hystrix","java","microservices","ribbon","spring","spring-boot","spring-cloud","zuul"],"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/WendellAdriel.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":"2017-11-30T10:21:08.000Z","updated_at":"2025-03-11T20:10:15.000Z","dependencies_parsed_at":"2022-08-07T12:15:29.431Z","dependency_job_id":null,"html_url":"https://github.com/WendellAdriel/spring-microservices","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fspring-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fspring-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fspring-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fspring-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WendellAdriel","download_url":"https://codeload.github.com/WendellAdriel/spring-microservices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249120200,"owners_count":21215910,"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":["architecture","boilerplate","docker","eureka","example","hystrix","java","microservices","ribbon","spring","spring-boot","spring-cloud","zuul"],"created_at":"2024-10-03T11:19:16.232Z","updated_at":"2025-04-15T17:38:49.469Z","avatar_url":"https://github.com/WendellAdriel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Microservices\n\n\u003e Example of a microservice architecture using Spring Cloud\n\n## Overview\n\nThe architecture is composed by four services:\n\n- `discovery-service`: Service Discovery Server created with **Eureka**\n- `api-gateway`: API Gateway created with **Zuul** that uses the `discovery-service` to send the requests to the services. It uses **Ribbon** as Load Balancer\n- `article-service`: Simple REST service created with **Spring Boot** to use as an example\n- `author-service`: Simple REST service created with **Spring Boot** to use as an example\n\nThe services: `api-gateway`, `article-service` and `author-service` are already configured with **Hystrix (latency and fault tolerance library)** and are providing a **stream** that you can use to monitor with a **Hystrix/Turbine** dashboard. You can check the **Hystrix Stream** accessing the service URL with `/hystrix.stream` (example: `http://localhost:8765/hystrix.stream`)\n\n## How to use\n\nTo test this architecture you will need to have: **JDK 8+**, **Docker** and **Maven** installed\n\n- Clone this repo and enter it\n\n- Run the `start.sh` script, it will use **Maven** to build the `.jar` file for each service and then use Docker to build the containers with the `.jar` files\n\nIn the default configuration you will have:\n\n- **Discovery Service** running on port `8761`, access `http://localhost:8761` to see the dashboard\n- **API Gateway** running on port `8765`, you will send the requests to this service\n- **Two Article Services** running on ports: `8080` and `9080`\n- **Two Author Services** running on ports: `8081` and `9081`\n\nAfter running the containers, head to `http://localhost:8761` to make sure that the four services (two **article** and two **author**) are registered in the **Discovery Service**, when they're all registered you can test the application with `curl` making requests to the endpoints below:\n\n- `curl http://localhost:8765/api/articles`\n- `curl http://localhost:8765/api/articles/id`\n- `curl http://localhost:8765/api/articles/author/id`\n- `curl http://localhost:8765/api/authors`\n- `curl http://localhost:8765/api/authors/id`\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/WendellAdriel/spring-microservices](https://github.com/WendellAdriel/spring-microservices). This project is intended to be a safe, welcoming space for collaboration.\n\n## License\n\nThis project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendelladriel%2Fspring-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwendelladriel%2Fspring-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendelladriel%2Fspring-microservices/lists"}