How npatil9287/java-microservices-examples works
Project Types and Their Purposes
• There are three main examples:
• A basic Spring Boot + Spring Cloud example that uses OAuth2 with Okta, Eureka (service discovery), and Zuul.
• A JHipster-based example where services (blog, gateway, store) are centrally configured via Spring Cloud Config (with Dockerized deployment files and liquibase migrations).
• A reactive Spring Cloud Gateway example that leverages Spring WebFlux to create a reactive API gateway and secured car-service.
• All examples integrate with Okta for OAuth2 authentication and use external services that include Eureka for service discovery, Spring Cloud Config (in the JHipster example), and in one case a reactive stack via Spring Cloud Gateway.
File Structure for Architectural Clues
• Top-level directories such as “jhipster”, “spring-boot+cloud”, and “spring-cloud-gateway” each contain a complete microservices solution.
• The “spring-boot+cloud” folder includes projects like “api-gateway”, “car-service”, and “discovery-service”. Notice the configuration using Maven, Docker files, and application properties with Okta settings.
• The “spring-cloud-gateway” folder is similar in concept to the Spring Boot+Cloud sample but uses a reactive stack.
• Docker Compose files, configuration YAMLs, and resource files (like liquibase changelogs, TLS keystores, and application.yml) indicate the deployment and runtime environments (e.g., central config, Dockerized registries, and monitoring setups).
• The directions in the README show how each “example” should be run and how services interconnect (for example, the registration of microservices with Eureka and routing by the gateway).
• For the Spring Boot + Spring Cloud example:
• An API Gateway, Car Service, and Discovery Service (Eureka). Show an external Okta Authorization Server.
• Communication flows: the API Gateway routes requests to the Car Service; both are secured (show Okta interactions).
• For the JHipster + Spring Cloud Config Example:
• Components such as the Blog, Gateway, and Store services.
• A central configuration server (JHipster Registry) and the service discovery component (Eureka).
• To note Dockerized deployments and configuration propagation from Spring Cloud Config.
• For the Spring Cloud Gateway Example:
• A reactive API Gateway alongside the reactive Car Service.
• Okta integration component and how the service registry is used.
b. Interactions and Data Flow:
• Service discovery flows (e.g., registration to Eureka) and the configuration flow from the Cloud Config Server.
c. Architectural Patterns and Layers:
• Separation of concerns: API Gateway (front door), Service Registry, and individual microservices.
• For the JHipster services, indicate that the UI-side (Angular application inside the gateway) is tightly integrated as the front end.
d. Technologies and Frameworks:
• Communication protocols (REST, OAuth2 secured endpoints) and consider adding notes for soft dependencies—like Maven builds, Docker deployments, Liquibase migrations, and monitoring setups (Grafana, Prometheus).