Microservices with Spring Boot and Spring Cloud - Second Edition: Build resilient and scalable microservices using Spring Cloud, Istio, and Kubernetes

Larsson, Magnus


A step-by-step guide to creating and deploying production-quality microservices-based applications

Key Features:

  • Build cloud-native production-ready microservices with this comprehensively updated guide
  • Understand the challenges of building large-scale microservice architectures
  • Learn how to get the best out of Spring Cloud, Kubernetes, and Istio in combination

Book Description:

With this book, you'll learn how to efficiently build and deploy microservices. This new edition has been updated for the most recent versions of Spring, Java, Kubernetes, and Istio, demonstrating faster and simpler handling of Spring Boot, local Kubernetes clusters, and Istio installation. The expanded scope includes native compilation of Spring-based microservices, support for Windows & Mac, and an introduction to Helm 3 for packaging and deployment. A revamped security chapter now follows the OAuth 2.1 specification and makes use of the newly launched Spring Authorization Server from the Spring team.

Starting with a set of simple cooperating microservices, you'll add persistence and resilience, make your microservices reactive, and document their APIs using Swagger/OpenAPI.

You'll understand how fundamental design patterns are applied to add important functionality, such as service discovery with Netflix Eureka and edge servers with Spring Cloud Gateway. You'll learn how to deploy your microservices using Kubernetes and adopt Istio. You'll explore centralized log management using the Elasticsearch, Fluentd, and Kibana (EFK) stack and monitor microservices using Prometheus and Grafana.

By the end of this book, you'll be confident in building microservices that are scalable and robust using Spring Boot and Spring Cloud.

What You Will Learn:

  • Build reactive microservices using Spring Boot
  • Develop resilient and scalable microservices using Spring Cloud
  • Use OAuth 2.1/OIDC and Spring Security to protect public APIs
  • Implement Docker to bridge the gap between development, testing, and production
  • Deploy and manage microservices with Kubernetes
  • Apply Istio for improved security, observability, and traffic management
  • Write and run manual and automated microservice tests with JUnit, testcontainers, Gradle, and bash

Who this book is for:

This book is intended for Java and Spring developers and architects who want to learn how to build microservice landscapes from the ground up and deploy them either on-premises or in the cloud, using Kubernetes as a container orchestrator and Istio as a service mesh.

No familiarity with microservices architecture is required to get started with this book.



- 使用這本全面更新的指南,構建雲原生的生產級微服務
- 瞭解構建大規模微服務架構的挑戰
- 學習如何在Spring Cloud、Kubernetes和Istio的組合中獲得最佳效果

這本書將教你如何高效地構建和部署微服務。本新版已更新至最新的Spring、Java、Kubernetes和Istio版本,展示了如何更快更簡單地處理Spring Boot、本地Kubernetes集群和Istio安裝。擴展的範圍包括基於Spring的微服務的本地編譯、支援Windows和Mac,以及Helm 3的封裝和部署介紹。重新設計的安全章節現在遵循OAuth 2.1規範,並使用Spring團隊新推出的Spring授權服務器。


你將瞭解如何應用基本設計模式來添加重要功能,例如使用Netflix Eureka進行服務發現,使用Spring Cloud Gateway進行邊緣伺服器。你將學習如何使用Kubernetes部署你的微服務,並採用Istio。你將探索使用Elasticsearch、Fluentd和Kibana(EFK)堆棧進行集中式日誌管理,並使用Prometheus和Grafana監控微服務。

通過閱讀本書,你將自信地使用Spring Boot和Spring Cloud構建可擴展和強大的微服務。

- 使用Spring Boot構建反應式微服務
- 使用Spring Cloud開發具有彈性和可擴展性的微服務
- 使用OAuth 2.1/OIDC和Spring Security保護公共API
- 實施Docker以彌合開發、測試和生產之間的差距
- 使用Kubernetes部署和管理微服務
- 應用Istio以提高安全性、可觀察性和流量管理
- 使用JUnit、testcontainers、Gradle和bash編寫和運行手動和自動化的微服務測試