Learn Microservices with Spring Boot (2nd edition)

Learn Microservices with Spring Boot (2nd edition)

In 2017, I wrote the book Learn Microservices with Spring Boot. Initially, it was a self-published project. After a few weeks online, Apress contacted me to publish it as part of its catalog, and I was glad to work with them to make it a better version.

I got a lot of feedback since then, and some technologies used in the book have been updated. Besides, I learned new topics, and came up with better ideas for structuring the contents of a new book.

So I’m now working on a Second Edition of this book with some interesting new additions:

  • Spring Boot 2.3.
  • More in-detail explanation about how Spring Boot works.
  • Smoother learning curve.
  • More focus on Non-Functional Requirements, with Resilience and Scalability in practice.
  • All the Cloud-native patterns have been updated to use the new standards: Spring Cloud Gateway, Spring Cloud Load Balancer. For consistency, Service Discovery uses now Consul instead of Eureka.
  • The small UI app uses React instead of plain JavaScript.
  • … and more!

Check the complete Table of Contents at the bottom of this page.

The book source code repositories are available online. Check them on Github.

Get a discount

Enter your name and email address and get a discount coupon when the book gets published. You’ll also receive the latest fragments as I’m publishing them as blog posts.

Note: I will NOT share your data or use it with another purpose different than sending you book updates.

* indicates required

The practical case study

All the contents in the book are presented around a practical case study, that evolves each chapter with the introduction of new concepts.

You start with a small monolith, looking at the best design practices, and you learn how Spring Boot works with real examples.

Then, you introduce a second microservice, and study the differences between synchronous and asynchronous communication. That’s how you get to Event-Driven architectures. Once you enter into the world of microservices, you must learn the most important architecture patterns for distributed systems: Gateway, Service Discovery, Load Balancing, Resilience, Scalability, Distributed Tracing, etc.

The book's practical case study - Component View

Table of Contents

Here you can have a sneak peek at the Table of Contents:

  1. Introduction
    1. Setting the scene
    2. Who are you?
    3. How is this book different from others?
    4. Contents
    5. Online Contents
  2. Core concepts
    1. Spring
    2. Spring Boot
    3. Lombok and Java
    4. Testing basics: TDD, BDD, JUnit, Mockito, AssertJ
    5. Testing in Spring Boot
    6. Logging
    7. Summary
  3. A basic Spring Boot app (+ GitHub Repo)
    1. Intro
    2. Business Requirements
    3. Setting up the development environment
    4. The Skeleton Web App
    5. Spring Boot Auto-Configuration (check the blog post)
    6. Three-tier, Three-layer Architecture
    7. Modeling our domain
    8. Business logic
    9. The Presentation Layer
    10. Summary
  4. A minimal frontend with React (+ GitHub Repo)
    1. Quick intro to React and Node
    2. Setting up the development environment
    3. The React app skeleton
    4. A JavaScript REST Client
    5. The Challenge Component
    6. Running our frontend for the first time
    7. Debugging
    8. Adding CORS configuration
    9. Playing with the app
    10. Deploying the frontend
    11. Summary
  5. The data layer (+ GitHub Repo)
    1. Intro
    2. The Data Model
    3. Choosing a database
    4. Spring Boot Data JPA
    5. Entities
    6. Repositories
    7. Storing users and attempts
    8. New APIs and UI
    9. Playing with the new feature
    10. Summary
  6. Starting with Microservices (+ GitHub Repo)
    1. Intro: what happened until now
    2. The Small Monolith approach
    3. New requirements and Gamification
    4. When should we move to microservices?
    5. Why microservices?
    6. Architecture Overview
    7. Designing and implementing the new microservice
    8. Playing with the system
    9. Fault Tolerance
    10. The challenges ahead
    11. Summary
  7. Event-Driven Architecture (+ GitHub Repo)
    1. Core Concepts
    2. Pros and Cons of Event-Driven
    3. Messaging Patterns
    4. Message Broker Protocols, Standards and Tools
    5. AMQP and RabbitMQ
    6. Setting up RabbitMQ
    7. Spring AMQP and Spring Boot
    8. Solution Design
    9. Analysis: happy flow, resilience, and scalability.
    10. Summary
  8. Common Patterns in Microservice Architectures (+ GitHub Repo)
    1. Gateway
    2. Health
    3. Service Discovery & Load Balancing (+ GitHub Repo)
    4. Configuration per Environment (+ GitHub Repo)
    5. Centralized Logs
    6. Distributed Tracing
    7. Containerization (+ GitHub Repo)
    8. Platforms and Cloud-Native Microservices
    9. Summary
  9. End-to-End tests with Cucumber
    1. Online Guide (to be published)
  10. Foreword

Book’s extra chapters

For this second edition, I’m planning to create book extensions that give you extra insights on other topics not included in the book. Subscribe to the newsletter to get the latest posts and guides.