{"id":21373321,"url":"https://github.com/duquejo/springboot-microservices","last_synced_at":"2026-05-09T15:01:45.316Z","repository":{"id":189868363,"uuid":"681463148","full_name":"duquejo/springboot-microservices","owner":"duquejo","description":"Springboot microservices course","archived":false,"fork":false,"pushed_at":"2023-08-22T04:35:15.000Z","size":231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T21:16:04.563Z","etag":null,"topics":["configserver","docker","eureka","java","keycloak","kubernetes","microservices","zipkin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"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/duquejo.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}},"created_at":"2023-08-22T04:30:15.000Z","updated_at":"2024-03-21T23:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"f257c5f6-0a1f-4fc7-bfcd-bceab88c22d0","html_url":"https://github.com/duquejo/springboot-microservices","commit_stats":null,"previous_names":["duquejo01/springboot-microservices","duquejo/springboot-microservices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2Fspringboot-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2Fspringboot-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2Fspringboot-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2Fspringboot-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duquejo","download_url":"https://codeload.github.com/duquejo/springboot-microservices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847061,"owners_count":20357317,"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":["configserver","docker","eureka","java","keycloak","kubernetes","microservices","zipkin"],"created_at":"2024-11-22T08:27:19.442Z","updated_at":"2026-05-09T15:01:40.235Z","avatar_url":"https://github.com/duquejo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Useful Maven Commands\n\n```shell\nmvn --version\nmvn clean install\nmvn spring-boot:run\n```\n\n```shell\ndocker build . -t duquejo/hotels\ndocker images\ndocker run -p 8080:8080 duquejo/hotels\n```\n\n#### Generating buildpacks with Maven\n\nYou must to preconfigurate in the pom.xml the following setup first:\n\n```xml\n\u003cproject\u003e\n    ...\n    \u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n                \u003cartifactId\u003espring-boot-maven-plugin\u003c/artifactId\u003e\n                \u003cconfiguration\u003e\n                    ...\n                    \u003cimage\u003e\n                        \u003cname\u003eduquejo/${project.artifactId}\u003c/name\u003e\n                    \u003c/image\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n\u003c/project\u003e\n```\n\nRunning the image generation service\n```bash\nmvn spring-boot:build-image -DskipTests\n```\n\nPublishing image in dockerhub\nYou must be logged in into dockerhub first. (Replace {} with the docker image name)\n```bash\ndocker push docker.io/{docker-image-name}\n```\n\n### General config server configuration\n- https://github.com/duquejo01/hotels-ms-configserver\n\n### Traceability\nWe could use the following Spring Cloud Tools, __Sleuth__ and __Zipkin__.\n\nFor __Sleuth__, we need to know about the terms which are listed next:\n\n- TraceId: General Microservice identification\n- SpanId: Individual Microservice request identification call.\n- Annotation: It will register general metrics such as request starting time, ending time, latency and healthiness for each service.\n    - cs (Client Sent): The client starts a request.\n    - sr (Server Received): The server gets and parses the request.\n    - ss (Server Sent): Server sends a response to client.\n    - cr (Client Received): The client gets the server response.\n\n__Zipkin__ will be our server for all Sleuth traces and monitoring.\nFor Zipkin, we can configure a server directly, or we can also add a message broker for log queues handling.\n\n```bash\ndocker run -d -p 9411:9411 openzipkin/zipkin\n```\n\n\n### Security\n__Keycloak__: Authorization/Authentication server lib\n- Authentication: Users veracity validation.\n- Authorization: Users capability verification.\n- Terms:\n  - Realm: Credentials, roles and group sets. It's like a project.\n  - Client: Keycloak Entity authorization for a user.\n\nStandards:\n- Oauth: Open authorization standard protocol\n- OpenId: Identity layer for Oauth extension purposes.\n- JWT: Json Web Token, open representation method for sharing data between two parts.\n\n```bash\ndocker run -p 8181:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:22.0.1 start-dev\n```\n\nKeycloak endpoint URLs\n```text\nhttp://localhost:8181/realms/booking/.well-known/openid-configuration\n```\n\n#### Token generation \u0026 Usage\n1. (optional) Generate a project custom realm.\n2. Generate a custom client for the application \"booking\".\n   3. Client Type: OpenId Connect\n   4. Client Authentication On\n   5. Authentication Flow: Standard Flow, Service accounts rules\n3. Generate the following POST request with this x-www-form-urlencoded body:\n   - client_id: Custom client app name.\n   - client_secret: You can retrieve it from Keycloak client credentials tab section.\n   - grant_type: client_credentials.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduquejo%2Fspringboot-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduquejo%2Fspringboot-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduquejo%2Fspringboot-microservices/lists"}