Skip to content

ctrlshift-hash/spring-boot-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Microservices Platform

A production-ready microservices architecture built with Spring Boot, featuring API Gateway, Service Discovery, Config Server, and multiple domain services. Demonstrates enterprise patterns, distributed systems, and cloud-native development.

Features

  • API Gateway - Centralized routing and load balancing with Spring Cloud Gateway
  • Service Discovery - Eureka-based service registry
  • Config Server - Centralized configuration management
  • User Service - Authentication and user management
  • Order Service - Order processing and management
  • Payment Service - Payment processing with multiple providers
  • Notification Service - Email and push notifications
  • Circuit Breaker - Resilience patterns with Resilience4j
  • Distributed Tracing - Observability with Sleuth and Zipkin
  • Database - PostgreSQL with JPA/Hibernate
  • Message Queue - RabbitMQ for async communication
  • Docker Support - Containerized services

Architecture

┌─────────────┐
│  API Gateway│
└──────┬──────┘
       │
   ┌───┴────┬──────────┬─────────┐
   │        │          │         │
┌──▼───┐ ┌──▼──┐ ┌─────▼──┐ ┌───▼────┐
│ User │ │Order│ │Payment │ │Notify  │
│Service│ │Service│ │Service │ │Service│
└───┬───┘ └──┬──┘ └────┬───┘ └───┬───┘
    │        │         │         │
    └────────┴─────────┴─────────┘
         Eureka Service Discovery

Tech Stack

  • Java 17 - Programming language
  • Spring Boot 3.x - Framework
  • Spring Cloud - Microservices toolkit
  • Spring Data JPA - Database access
  • PostgreSQL - Database
  • RabbitMQ - Message broker
  • Eureka - Service discovery
  • Resilience4j - Circuit breaker
  • Maven - Build tool
  • Docker - Containerization

Getting Started

Prerequisites

  • Java 17+
  • Maven 3.8+
  • Docker & Docker Compose
  • PostgreSQL

Build

mvn clean install

Run Services

# Start infrastructure (Eureka, Config Server, RabbitMQ)
docker-compose up -d

# Start services
java -jar gateway-service/target/gateway-service.jar
java -jar user-service/target/user-service.jar
java -jar order-service/target/order-service.jar

Project Structure

java-microservices/
├── api-gateway/          # API Gateway service
├── service-discovery/     # Eureka server
├── config-server/         # Configuration server
├── user-service/          # User management
├── order-service/         # Order processing
├── payment-service/       # Payment processing
├── notification-service/  # Notifications
├── common/               # Shared libraries
│   ├── dto/              # Data Transfer Objects
│   └── exceptions/       # Exception handlers
└── docker-compose.yml    # Infrastructure setup

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages