A Practical Approach to RESTful Services Using an Event-Driven Architecture, Cloud-Native Patterns, and Containerization
Build Java-based microservices architecture using the Spring Boot framework by evolving an application from a small monolith to an event-driven architecture composed of several services. This revised book follows an incremental approach in teaching the structure of microservices, test-driven development, and common patterns in distributed systems such as service discovery, load balancing, routing, centralized logs, per-environment configuration, and containerization.
This updated book now covers what's been added to the latest Spring Boot release, including support for the latest Java SE; more deep-dive knowledge on how Spring Boot works; testing with JUnit 5; changes in the Spring Cloud tools used for service discovery and load balancing; building Docker images using cloud-native buildpacks; a basic centralized logging solution; E2E traceability with Sleuth; centralized configuration with Consul; many dependency upgrades; support for Spring Data Neumann; and more.
Author Moises Macero uses a pragmatic approach to explain the benefits of using this type of software architecture, instead of keeping you distracted with theoretical concepts. He covers some of the state-of-the-art techniques in computer programming, from a practical point of view. You’ll focus on what's important, starting with the minimum viable product but keeping the flexibility to evolve it.
What You Will Learn
• Build microservices with Spring Boot
• Discover architecture patterns for distributed systems such as asynchronous processing, eventual consistency, resilience, scalability, and more
• Use event-driven architecture and messaging with RabbitMQ
• Master service discovery with Consul and load balancing with Spring Cloud Load Balancer
• Route requests with Spring Cloud Gateway
• Keep flexible configurations per environment with Spring Cloud Consul
• Trace every request from b
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide that grows a small Spring Boot application into a full event-driven microservices system, so you learn each distributed-systems pattern by feeling the pain it solves. Best for Java developers who know some Spring but want a realistic, code-along path from monolith to cloud-native deployment.
【Book Arc】
- **Opening (~0%–10%)**: Sets expectations and audience, explains the incremental "evolve a real app" method, and previews the journey from a small monolith to microservices with TDD, messaging, and containers.
- **Early (~10%–35%)**: Builds the foundation—Spring, Spring Boot autoconfiguration, starters, profiles, testing libraries, Lombok, and logging—then designs and implements a production-style layered Spring Boot app with a REST API, business logic, and a database layer.
- **Middle (~35%–60%)**: Introduces the second service (gamification) to create a genuine microservices architecture, weighing the pros and cons of splitting, and confronting tight coupling and synchronous interfaces.
- **Late (~60%–85%)**: Adds distributed-systems machinery—event-driven messaging with RabbitMQ, service discovery, load balancing, routing, centralized configuration, and end-to-end tracing.
- **Ending (~85%–100%)**: Containerizes the services and UI, orchestrates them with Docker Compose, scales the system, and surveys cloud-native platforms and deployment choices.
【Key Takeaways】
- **Microservices are learned by evolution, not by decree** (Early): the book starts with a small monolith and refactors outward, so each split is motivated by a concrete requirement rather than architectural fashion.
- **Spring Boot's magic is demystified** (Early): autoconfiguration, starters, and profiles are explained internally so you stay in control instead of losing awareness behind defaults.
- **TDD drives the feature map** (Early): JUnit 5, AssertJ, and Mockito are used to write tests first, fail them, then implement—making testing a design tool, not an afterthought.
- **A second service is what makes it "microservices"** (Middle): only once functionality is split across services do discovery, routing, and resilience patterns become meaningful.
- **Event-driven architecture replaces brittle synchronous calls** (Late): RabbitMQ and AMQP introduce asynchronous processing and eventual consistency, addressing the tight coupling flagged earlier.
- **Operational concerns are first-class** (Late): service discovery with Consul, load balancing, Spring Cloud Gateway routing, centralized configuration, and Sleuth-based traceability are treated as core, not optional.
- **Containerization completes the picture** (Ending): Docker images via buildpacks, Docker Compose orchestration, and scaling show how the system actually runs.
- **Trade-offs are stated, not hidden** (Middle): the book covers disadvantages of microservices and when a small monolith is the better fit for small teams.
【Reading Tips】
- Code along with the GitHub repositories (Book-Microservices-v2), which are split by chapter so you can see each evolutionary step rather than only the final state.
- Deep-read the Spring Boot internals and testing chapters; skim the UI and boilerplate sections if you already know them.
- Treat the monolith-to-microservices transition as the conceptual hinge—pause there and ask whether the split fits your own system.
- Use the online companion content (e.g., Cucumber end-to-end testing) after finishing the book to extend the case study.
【Coverage Limits】
This guide is based on stratified excerpts and the book's front matter; specific chapter-level implementation details beyond the table of contents and early conceptual chapters are not fully covered here.
Excerpt 1
• Use event-driven architecture and messaging with RabbitMQ • Master service discovery with Consul and load balancing with Spring Cloud Load Balancer • Route...
ys, service discovery, containers, resilience patterns, etc. I can’t socialize anymore with my colleagues if I don’t get what they’re saying.” (This one is a...
Spring, Spring Boot, testing libraries, Lombok, and logging. These concepts deserve a separate introduction to avoid long interruptions in our learning path,...
er granularity of options when compared to the Java records. For these reasons, we won’t use records in this book. Testing Basics In this section, we’ll go t...
s even better to choose a generic abstraction such as SLF4J. The good news is that Spring Boot comes with all this logging configuration already set up for u...
by default in our main sources, MultiplicationApplication . It’s already annotated with @SpringBootApplication and contains the main method that boots up the...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Learn Microservices with Spring Boot - Second Edition (Moisés Macero García [Macero García, Moisés]) (Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Learn Microservices with Spring Boot - Second Edition (Moisés Macero García [Macero García, Moisés]) (Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment