How packtpublishing/microservices-with-spring-boot-and-spring-cloud-third-edition works
This repository accompanies a book on building production-ready Spring Boot and Spring Cloud microservices; the tree shows successive chapter snapshots of a product system. The principal workflow is a client requesting a product aggregate, with product, recommendation, and review services supplying domain data; later chapters add persistence and reactive/event-driven behavior. The README documents broader deployment, security, discovery, resilience, and observability topics, but their implementation files are not in the supplied tree. Edges without shown call sites are dashed and unverified.
Main entry points: ProductCompositeIntegration.java Core integration · ProductServiceImpl.java Product service · RecommendationServiceImpl.java Recommendation service · ReviewServiceImpl.java Review service
Components 17
API composition
- Product composite
Chapter06/microservices/product-composite-service/src/main/java/se/magnus/microservices/composite/product/services/ProductCompositeServiceImpl.java - Core integration
Chapter06/microservices/product-composite-service/src/main/java/se/magnus/microservices/composite/product/services/ProductCompositeIntegration.java - Service contracts
Chapter07/api/src/main/java/se/magnus/api/composite/product/ProductCompositeService.java
Domain services
- Product service
Chapter07/microservices/product-service/src/main/java/se/magnus/microservices/core/product/services/ProductServiceImpl.java - Recommendation service
Chapter07/microservices/recommendation-service/src/main/java/se/magnus/microservices/core/recommendation/services/RecommendationServiceImpl.java - Review service
Chapter23/microservices/review-service/src/main/java/se/magnus/microservices/core/review/services/ReviewServiceImpl.java
Persistence
- Product repository
Chapter07/microservices/product-service/src/main/java/se/magnus/microservices/core/product/persistence/ProductRepository.java - Recommendation repository
Chapter07/microservices/recommendation-service/src/main/java/se/magnus/microservices/core/recommendation/persistence/RecommendationRepository.java - Review repository
Chapter07/microservices/review-service/src/main/java/se/magnus/microservices/core/review/persistence/ReviewRepository.java
Reactive messaging
- Event envelope
Chapter07/api/src/main/java/se/magnus/api/event/Event.java - Message broker
Other components
- API client
- Edge gateway
Chapter10 - Service discovery
Chapter09 - API security
Chapter11 - Container orchestration
Chapter04 - Tracing and monitoring
Chapter07
Connections 15
- API client → Product composite: requests aggregate
- Product composite → Core integration: delegates calls
- Core integration → Product service: calls product
- Core integration → Recommendation service: calls recommendations
- Core integration → Review service: calls reviews
- Product service → Product repository: reads and writes
- Recommendation service → Recommendation repository: reads and writes
- Review service → Review repository: reads and writes
- Product service → Message broker: publishes events
- Recommendation service → Message broker: consumes events
- Review service → Message broker: consumes events
- Event envelope → Message broker: encodes messages
- API client → Edge gateway: enters through
- Edge gateway → Service discovery: uses discovery
- Container orchestration → Tracing and monitoring: supports operations