Master Microservices with Spring Boot and Spring Cloud

Video description

Beginning with the basics, this course covers the core principles of microservices architecture, contrasting it with traditional monolithic structures to highlight its modern software development benefits. You'll learn the process of breaking down complex applications into manageable, modular services that can be developed, deployed, and scaled independently. As the course unfolds, you'll delve into the creation of microservices using Spring Boot, exploring its convention over configuration philosophy that speeds up development time without sacrificing power or flexibility. With Spring Cloud, master the management of your microservices ecosystem, covering service discovery with Netflix Eureka, client-side load balancing with Ribbon, and implementing API gateways for efficient service-to-service communication.

Advanced topics include ensuring microservices resilience with Resilience4J, where you'll tackle patterns like circuit breakers and bulkheads to design fault-tolerant systems. Gain hands-on experience with deploying microservices in containerized environments using Docker and orchestrating them with Kubernetes, preparing you for the cloud-native landscape.

By the end of this course, you will have a solid foundation in microservices, along with the skills to design, develop, and deploy microservices applications confidently.

What you will learn

  • Create and manage microservices using Spring Boot and Spring Cloud
  • Utilize Docker and Kubernetes for microservices deployment
  • Apply Spring Security for authentication and authorization
  • Understand and implement Eureka, Ribbon, Feign, and Hystrix
  • Configure and manage microservices with Spring Cloud Config
  • Enhance microservices with centralized logging and monitoring

Audience

This course is for individuals at both beginner and experienced levels who want to learn how to design and develop RESTful web services with Spring Boot, and design and develop microservices with Spring Cloud. Apart from this, enthusiasts who want to learn to build containers for microservices with Docker and orchestrate microservices with Kubernetes. The basic requirement for this course is the attitude to learn while having fun. This course is designed for students with zero experience with either of the technologies – Java, Spring Boot, Spring Cloud, Docker, and Kubernetes.

About the Author

In28Minutes Official: Ranga Rao Karanam is the founder of in28Minutes, a company that trains 300,000 developers across the globe in relation to the cloud, microservices, Spring, Spring Boot, and Containers. He loves programming, and loves consulting for start-ups on developing scalable cloud applications and following modern development practices, such as BDD, continuous delivery, and DevOps. In his spare time, he loves hiking, cricket, and tennis. His ambition is to spend a year hiking the Himalayas.

Table of contents

  1. Chapter 1 : Introduction
    1. Microservices and RESTful APIs with Spring Boot and Spring Cloud
    2. Introduction to the Course and Course Guide
    3. A Surprise! New Course Updates
  2. Chapter 2 : Introduction to Web Services
    1. What is a Web Service?
    2. Important Questions Related to Web Services
    3. Web Services - Key Terminology
    4. Introduction to SOAP (Simple Object Access Protocol) Web Services
    5. Introduction to RESTful Web Services
    6. SOAP Versus RESTful Web Services
  3. Chapter 3 : RESTful Web Services with Spring Boot
    1. Section Introduction - RESTful Web Services with Spring Boot
    2. Step 01 - Initializing a RESTful Services Project with Spring Boot
    3. Step 02 - Understanding the RESTful Services We will Create in this Course
    4. Step 03 - Creating a Hello World Service
    5. Step 04 - Enhancing the Hello World Service to Return a Bean
    6. Step 05 - Quick Review of Spring Boot Auto Configuration and Dispatcher Servlet
    7. Step 06 - Enhancing the Hello World Service with a Path Variable
    8. Step 07 - Creating User Bean and User Service
    9. Step 08 - Implementing GET Methods for User Resource
    10. Step 09 - Implementing POST Method to Create User Resource
    11. Step 10 - Enhancing POST Method to Return Correct HTTP Status Code and Location
    12. Step 11 - Implementing Exception Handling - 404 Resource Not Found
    13. Step 12 - Implementing Generic Exception Handling for All Resources
    14. Step 13 - Exercise: User Post Resource and Exception Handling
    15. Step 14 - Implementing DELETE Method to Delete a User Resource
    16. Step 15 - Implementing Validations for RESTful Services
    17. Step 16 - Implementing HATEOAS for RESTful Services
    18. Step 17 - Overview of Advanced RESTful Service Features
    19. Step 18 - Internationalization for RESTful Service
    20. Step 18 Part 2 - Internationalization for RESTful Services
    21. Step 19 - Content Negotiation - Implementing Support for XML
    22. Step 20 - Configuring Auto Generation of Swagger Documentation
    23. Step 21 - Introduction to Swagger Documentation Format
    24. Step 22 - Enhancing Swagger Documentation with Custom Annotations
    25. Step 23 - Monitoring APIs with Spring Boot Actuator
    26. Step 24 - Implementing Static Filtering for RESTful Service
    27. Step 25 - Implementing Dynamic Filtering for RESTful Service
    28. Step 26 - Versioning RESTful Services - Basic Approach with URIs
    29. Step 27 - Versioning RESTful Services - Header and Content Negotiation Approach
    30. Step 28 - Implementing Basic Authentication with Spring Security
    31. Step 29 - Overview of Connecting RESTful Service to JPA
    32. Step 30 - Creating User Entity and Some Test Data
    33. Step 31 - Updating GET Methods on User Resource to Use JPA
    34. Step 32 - Updating POST and DELETE Methods on User Resource to Use JPA
    35. Step 33 - Creating Post Entity and Many to One Relationship with User Entity
    36. Step 34 - Implementing a GET Service to Retrieve All Posts of a User
    37. Step 35 - Implementing a POST Service to Create a Post for a User
    38. Step 36 - Richardson Maturity Model
    39. Step 37 - RESTful Web Services - Best Practices
  4. Chapter 4 : Quick Introduction to Microservices
    1. Section Introduction - Microservices with Spring Cloud
    2. Step 00 - 01 - Introduction to Microservices
    3. Step 00 - 02 - Challenges with Microservices
    4. Step 00 - 03 - Introduction to Spring Cloud
    5. Step 00 - 04 - Advantages of Microservices Architectures
    6. Step 00 - 05 - Microservice Components - Standardizing Ports and URL
  5. Chapter 5 : Microservices with Spring Cloud - V1
    1. Next Section Uses Latest Version of Spring Boot
    2. Step 01 - Part 1 - Introduction to Limits Microservice and Spring Cloud Config Server
    3. Step 01 - Part 2 - Setting Up Limits Microservice
    4. Step 02 - Creating a Hard Coded Limits Service
    5. Step 03 - Enhance Limits Service to Get Configuration from Application Properties
    6. Step 04 - Setting Up Spring Cloud Config Server
    7. Step 05 - Installing Git
    8. Step 06 - Creating Local Git Repository
    9. Step 07 - Connect Spring Cloud Config Server to Local Git Repository
    10. Step 08 - Configuration for Multiple Environments in Git Repository
    11. Step 09 - Connect Limits Service to Spring Cloud Config Server
    12. Step 10 - Configuring Profiles for Limits Service
    13. Step 11 - A Review of Spring Cloud Config Server
    14. Step 12 - Introduction to Currency Conversion and Currency Exchange Microservice
    15. Step 13 - Setting Up Currency Exchange Microservice
    16. Step 14 - Create a Simple Hard Coded Currency Exchange Service
    17. Step 15 - Setting Up Dynamic Port in the Response
    18. Step 16 - Configure JPA and Initialized Data
    19. Step 17 - Create a JPA Repository
    20. Step 18 - Setting Up Currency Conversion Microservice
    21. Step 19 - Creating a Service for Currency Conversion
    22. Step 20 - Invoking Currency Exchange Microservice from Currency Conversion Micro
    23. Step 21 - Using Feign REST Client for Service Invocation
    24. Step 22 - Setting Up Client-Side Load Balancing with Ribbon
    25. Step 23 - Running Client-Side Load Balancing with Ribbon
    26. Step 24 - Understand the Need for a Naming Server
    27. Step 25 - Setting Up Eureka Naming Server
    28. Step 26 - Connecting Currency Conversion Microservice to Eureka
    29. Step 27 - Connecting Currency Exchange Microservice to Eureka
    30. Step 28 - Distributing Calls Using Eureka and Ribbon
    31. Step 29 - A Review of Implementing Eureka, Ribbon, and Feign
    32. Step 30 - Introduction to API Gateways
    33. Step 31 - Setting Up Zuul API Gateway
    34. Step 32 - Implementing Zuul Logging Filter
    35. Step 33 - Executing a Request through Zuul API Gateway
    36. Step 34 - Setting Up Zuul API Gateway Between Microservice Invocations
    37. Step 35 - Introduction to Distributed Tracing
    38. Step 36 - Implementing Spring Cloud Sleuth
    39. Step 37 - Introduction to Distributed Tracing with Zipkin
    40. Step 38 - Installing Rabbit MQ
    41. Step 39 - Setting Up Distributed Tracing with Zipkin
    42. Step 40 - Connecting Microservices to Zipkin
    43. Step 41 - Using Zipkin UI Dashboard to Trace Requests
    44. Step 42 - Understanding the Need for Spring Cloud Bus
    45. Step 43 - Implementing Spring Cloud Bus
    46. Step 44 - Fault Tolerance with Hystrix
  6. Chapter 6 : Microservices with Spring Cloud - V2
    1. What's NEW in V2?
    2. Have You Already Completed V1?
    3. Step 01 - Setting Up Limits Microservice – V2
    4. Step 02 - Creating a Hard Coded Limits Service – V2
    5. Step 03 - Enhance Limits Service - Get Configuration from Application Props - V2
    6. Step 04 - Setting Up Spring Cloud Config Server - V2
    7. Step 05 - Installing Git and Creating Local Git Repository - V2
    8. Step 06 - Connect Spring Cloud Config Server to Local Git Repository - V2
    9. Step 07 - Connect Limits Service to Spring Cloud Config Server - V2
    10. Step 08 - Configuring Profiles for Limits Service - V2
    11. Debugging Guide for Microservices V2 + Docker + Docker Compose
    12. Step 09 - Introduction to Currency Conversion and Exchange Microservices - V2
    13. Step 10 - Setting Up Currency Exchange Microservice - V2
    14. Step 11 - Create a Simple Hard Coded Currency Exchange Service - V2
    15. Step 12 - Setting Up Dynamic Port in the Response - V2
    16. Step 13 - Configure JPA and Initialized Data - V2
    17. Step 14 – Create a JPA Repository – V2
    18. Step 15 - Setting Up Currency Conversion Microservice - V2
    19. Step 16 - Creating a Service for Currency Conversion - V2
    20. Step 17 - Invoking Currency Exchange from Currency Conversion Microservice - V2
    21. Step 18 - Using Feign REST Client for Service Invocation - V2
    22. Step 19 - Understand Naming Server and Setting Up Eureka Naming Server - V2
    23. Step 20 - Connect Currency Conversion and Currency Exchange Microservices - V2
    24. Step 21 - QuickStart by Importing Microservices
    25. Step 22 - Load Balancing with Eureka, Feign, and Spring Cloud LoadBalancer - V2
    26. Step 22 - Setting Up Spring Cloud API Gateway
    27. Step 23 - Enabling Discovery Locator with Eureka for Spring Cloud Gateway
    28. Step 24 - Exploring Routes with Spring Cloud Gateway
    29. Step 25 - Implementing spring Cloud Gateway Logging Filter
    30. Step 26 - Getting Started with Circuit Breaker - Resilience4j
    31. Step 27 - Playing with Resilience4j - Retry and Fallback Methods
    32. Step 28 - Playing with Circuit Breaker Features of Resilience4j
    33. Step 29 - Exploring Rate Limiting and BulkHead Features of Resilience4j - V2
    34. Debugging Guide for Microservices V2 + Docker + Docker Compose
  7. Chapter 7 : Docker with Microservices Using Spring Boot and Spring Cloud - V2
    1. Step 00 - Match Made in Heaven - Docker and Microservices
    2. Step 01 - Installing Docker
    3. Step 02 - Your First Docker Usecase - Deploy a Spring Boot Application
    4. Step 03 - Docker Concepts - Registry, Repository, Tag, Image, and Containers
    5. Step 04 - Playing with Docker Images and Containers
    6. Step 05 - Understanding Docker Architecture - Docker Client, Docker Engine
    7. Step 06 - Why is Docker Popular?
    8. Step 07 - Playing with Docker Images
    9. Step 08 - Playing with Docker Containers
    10. Step 09 - Playing with Docker Commands - stats, system
    11. Step 10 - Introduction to Distributed Tracing
    12. Step 11 - Launching Zipkin Container Using Docker
    13. Step 12 00 - Getting Started with Observability and OpenTelemetry
    14. Step 12 - Connecting Currency Exchange Microservice with Zipkin
    15. Step 13 - Connecting Currency Conversion Microservice and API Gateway with Zipkin
    16. Step 14 - Getting Setup with Microservices for Creating Container Images
    17. Step 15 - Creating Container Image for Currency Exchange Microservice
    18. Step 16 - Getting Started with Docker Compose - Currency Exchange Microservice
    19. Step 17 - Running Eureka Naming Server with Docker Compose
    20. Step 18 - Running Currency Conversion Microservice with Docker Compose
    21. Step 19 - Running Spring Cloud API Gateway with Docker Compose
    22. Step 20 - Running Zipkin with Docker Compose
    23. Step 21 - Running Zipkin and RabbitMQ with Docker Compose
  8. Chapter 8 : Kubernetes with Microservices using Docker, Spring Boot, and Spring Cloud - V2
    1. Step 00 - Docker, Kubernetes, and Microservices - Made for Each Other
    2. Step 01 - Getting Started with Docker, Kubernetes, and Google Kubernetes Engine
    3. Step 02 - Creating Google Cloud Account
    4. Step 03 - Creating Kubernetes Cluster with Google Kubernete Engine (GKE)
    5. Step 04 - Review Kubernetes Cluster and Learn Few Fun Facts about Kubernetes
    6. Step 05 - Deploy Your First Spring Boot Application to Kubernetes Cluster
    7. Step 06 - Quick Look at Kubernetes Concepts - Pods, Replica Sets, and Deployment
    8. Step 07 - Understanding Pods in Kubernetes
    9. Step 08 - Understanding Replica Sets in Kubernetes
    10. Step 09 - Understanding Deployment in Kubernetes
    11. Step 10 - Quick Review of Kubernetes Concepts - Pods, Replica Sets, and Deployments
    12. Step 11 - Understanding Services in Kubernetes
    13. Step 12 - Quick Review of GKE on Google Cloud Console
    14. Installing Gcloud
    15. Installing Kubectl
    16. Step 13 - Understanding Kubernetes Architecture - Master Node and Nodes
    17. Step 14 - Set Up Currency Exchange and Conversion Microservices - Kubernetes
    18. Step 15 - Container Images for Exchange and Currency Conversion Microservices
    19. Step 16 - Deploy Microservices to Kubernetes and Understand Service Discovery
    20. Step 17 - Creating Declarative Configuration Kubernetes YAML for Microservices
    21. Step 18 - Clean Up Kubernetes YAML for Microservices
    22. Step 19 - Enable Logging and Tracing APIs in Google Cloud Platform
    23. Step 20 - Deploying Microservices Using Kubernetes YAML Configuration
    24. Step 21 - Playing with Kubernetes Declarative YAML Configuration
    25. Step 22 - Creating Environment Variables to Enable Microservice Communication
    26. Step 23 - Understanding Centralized Configuration in Kubernetes - Config Maps
    27. Step 24 - Exploring Centralized Logging and Monitoring in GKE
    28. Step 25 - Exploring Microservices Deployments with Kubernetes
    29. Step 26 - Configuring Liveness and Readiness Probes for Microservices with K8S
    30. Step 27 - Autoscaling Microservices with Kubernetes
    31. Step 28 - Delete Kubernetes Cluster and Thank You!
  9. Chapter 9 : Appendix - Introduction to Spring Boot in 12 Steps
    1. Step 01 - Getting Started with Spring Boot – Goals
    2. Step 02 - Understanding the World Before Spring Boot - 10000 Feet Overview
    3. Step 03 - Setting up New Spring Boot Project with Spring Initializr
    4. Step 04 - Build a Hello World API with Spring Boot
    5. Step 05 - Understanding the Goal of Spring Boot
    6. Step 06 - Understanding Spring Boot Magic - Spring Boot Starter Projects
    7. Step 07 - Understanding Spring Boot Magic - Auto Configuration
    8. Step 08 - Build Faster with Spring Boot DevTools
    9. Step 09 - Get Production Ready with Spring Boot - 1 – Profiles
    10. Step 10 - Get Production Ready with Spring Boot - 2 – ConfigurationProperties
    11. Step 11 - Get Production Ready with Spring Boot - 3 - Embedded Servers
    12. Step 12 – Get Production Ready with Spring Boot - 4 – Actuator
    13. Step 13 - Understanding Spring Boot vs Spring vs Spring MVC
    14. Step 14 - Getting Started with Spring Boot – Review
  10. Chapter 10 : Appendix - Introduction to JUnit
    1. 01 Step 01 - What is JUnit and Unit Testing?
    2. 01 Step 02 - Your First JUnit Project and Green Bar
    3. 01 Step 03 - Your First Code and First Unit
    4. 01 Step 04 - Exploring other assert methods
    5. 01 Step 05 - Exploring few important JUnit annotations
  11. Chapter 11 : Appendix - Introduction To Mockito
    1. 02 Step 00 - Introduction to Section - Mockito in 5 Steps
    2. 02 Step 01 - Setting up a Spring Boot Project
    3. 02 Step 02 - Understanding problems with Stubs
    4. 02 Step 03 - Writing your first Mockito test with Mocks
    5. 02 Step 04 - Simplifying Tests with Mockito Annotations - @Mock, @InjectMocks
    6. 02 Step 05 - Exploring Mocks further by Mocking List interface
  12. Chapter 12 : Appendix - Introduction to Maven
    1. Maven Step 01 - Introduction to Maven
    2. Maven Step 02 - Creating a Spring Boot Project with Maven
    3. Maven Step 03 - Exploring Maven pom.xml for Spring Boot Project
    4. Maven Step 04 - Exploring Maven Parent Pom for Spring Boot Project
    5. Maven Step 05 - Exploring Maven Further
    6. Maven Step 06 - Exploring Maven Build Lifecycle with a Spring Boot Project
    7. Maven Step 07 - How does Maven Work?
    8. Maven Step 08 - Playing with Maven Commands
    9. Maven Step 09 - How are Spring Projects Versioned?
  13. Chapter 13 : Appendix - Introduction to Gradle
    1. Gradle Step 01 - Getting Started with Gradle
    2. Gradle Step 02 - Creating a Spring Boot Project with Gradle
    3. Gradle Step 03 - Exploring Gradle Build and Settings Files
    4. Gradle Step 04 - Exploring Gradle Plugins for Java and Spring Boot
    5. Gradle Step 05 - Maven or Gradle - Which one to use for Spring Boot Projects?
  14. Chapter 14 : Appendix - Introduction to JPA in 10 Steps - V2
    1. Step 01 - Getting Started with JPA and Hibernate – Goals
    2. Step 02 - Setting up New Spring Boot Project for JPA and Hibernate
    3. Step 03 - Launching up H2 Console and Creating Course Table in H2
    4. Step 04 - Getting Started with Spring JDBC
    5. Step 05 - Inserting Hardcoded Data using Spring JDBC
    6. Step 06 - Inserting and Deleting Data using Spring JDBC
    7. Step 07 - Querying Data using Spring JDBC
    8. Step 08 - Getting Started with JPA and EntityManager
    9. Step 09 - Exploring the Magic of JPA
    10. Step 10 - Getting Started with Spring Data JPA
    11. Step 11 - Exploring features of Spring Data JPA
    12. Step 12 - Understanding difference between Hibernate and JPA
  15. Chapter 15 : APPENDIX - Introduction to Functional Programming in 30 Minutes
    1. Step 00 - Introduction to Functional Programming – Overview
    2. Step 01 - Getting Started with Functional Programming with Java
    3. Step 02 - Writing Your First Java Functional Program
    4. Step 03 - Improving Java Functional Program with filter
    5. Step 04 - Using Lambda Expression to enhance your Functional Program
    6. Step 05 - Do Functional Programming Exercises with Streams, Filters and Lambdas
    7. Step 06 - Using map in Functional Programs - with Exercises
    8. Step 07 - Understanding Optional class in Java
    9. Step 08 - Quick Review of Functional Programming Basics

Product information

  • Title: Master Microservices with Spring Boot and Spring Cloud
  • Author(s): In28Minutes Official
  • Release date: April 2024
  • Publisher(s): Packt Publishing
  • ISBN: 9781789132779