Microservices with Spring Boot 4
Thirty-four chapters covering the full lifecycle of decomposing a monolith into production microservices. Builds on the CinéTrack domain by splitting it into 8 services, then adds API gateways, service discovery, Kafka, resilience, OAuth2, Kubernetes, and chaos engineering. Working code throughout.
What you'll learn
Domain-driven service boundary decisions and when not to split
Service-to-service communication with REST, gRPC, and events
Kafka for event-driven communication between services
Resilience4j circuit breakers, retries, and bulkheads
OAuth2 and JWT for service-to-service and user-facing security
Deploying and operating Spring Boot services on Kubernetes
The outbox pattern, sagas, and CQRS across service boundaries
Contract testing, Testcontainers, and integration testing strategies
GraalVM native images, reactive microservices with WebFlux, and multi-region deployments
Table of Contents
Foundations
- 01 The Microservices Decision
- 02 Domain-Driven Design for Service Boundaries
- 03 Your First Spring Boot 4 Microservice
- 04 Service-to-Service Communication
Infrastructure
- 05 Service Discovery and Load Balancing
- 06 API Gateway with Spring Cloud Gateway
- 07 Configuration Management
- 08 Resilience — Circuit Breakers and Bulkheads
- 09 Observability — Tracing, Metrics, Logs
- 10 Database per Service
Consistency
- 11 Eventual Consistency in Practice
- 12 The Outbox Pattern
- 13 The Saga Pattern
- 14 CQRS at the Service Level
Security and Testing
- 15 OAuth2 and JWT in Microservices
- 16 Service-to-Service Security
- 17 Testing Microservices
Deployment
- 18 Containerizing Spring Microservices
- 19 Kubernetes for Spring Developers
- 20 Deployment Patterns
- 21 The Modular Monolith as Gateway
- 22 Migrating from Monolith to Microservices
Advanced
- 23 API Versioning and Governance
- 24 Performance and Scalability
- 25 GraalVM Native and Spring AOT
- 26 Event Sourcing in Microservices
- 27 Schema Registry and Event Contracts
- 28 gRPC — Streaming and Advanced Patterns
- 29 Service Mesh with Istio
- 30 Multi-Tenancy in Microservices
- 31 Distributed Locking and Coordination
- 32 Reactive Microservices with WebFlux
- 33 Multi-Region and Global Deployment
- 34 Chaos Engineering