
Learn to transform a monolithic application into micro services using spring board and spring cloud through a step-by-step tutorial, with downloadable source code and adjustable pacing.
Download and install the JDK from Oracle or OpenJDK, install Apache Maven and an IDE such as Spring Tool Suite, and configure two environment variables for the JDK and Maven.
Install Postman from the official website, open the tool, and learn to craft requests with get, post, put, and delete, including URL, query parameters, and JSON payloads.
Install and start MySQL on your local machine, connect with MySQL Workbench to the local database via localhost:3306, and explore the default schemas before creating a new schema for microservices.
Identify a monolithic application using a university system with six components. Examine drawbacks like complexity, tight coupling, and costly scalability, setting up the microservices discussion in the next lecture.
Define microservices as small, independent Spring Boot applications that replace monolithic components, enabling isolated development, easier testing, loose coupling, fault isolation, and targeted scalability in cloud environments.
Spring Cloud provides projects to help developers quickly develop and maintain microservices, rescuing teams from manual management; explore the official Spring Cloud projects we will cover in this course.
Explore spring cloud projects that enable microservices to communicate via rest and messaging, register with Eureka, balance load, route through an api gateway, and centralize configurations with a config server.
Explore the university database schema with two tables, address and student, detailing columns like city, street, address_id, and student_id, and explain their relationship in MySQL.
Study a spring boot monolithic university app with a one-to-one student-address mapping. Configure mysql connections, create and fetch students, and preview future microservices.
Create an address service microservice from the monolith, configure Spring Data JPA with MySQL, set up controller, service, entity, repository, and request/response models for local and cloud runs.
Configure address microservice by creating a create address request and address response, wiring the address repository, and exposing a rest controller and service to convert entities to the response model.
Add rest APIs to the address microservice by creating an address via post and retrieving by id via get, using the address repository and service layer with entity-to-response mapping.
Run and test the address microservice with Spring Boot, create an address via Postman, verify it in the address table, then retrieve it by ID to validate the API.
Create a new spring boot student service from university monolith, migrate packages, configure database and port 8080, and refactor to use address id by removing the address entity and repository.
Configure WebClient to replace RestTemplate, wire a WebClient bean, and call the address service from the student service using the base URL from properties.
Learn how the student service calls the address microservice to fetch address by id and return combined student and address data using Spring Boot and Spring Cloud.
Run and test the student and address microservices locally, observe how the student service calls the address service via a web client to enrich student data with address details.
Discover how spring cloud openfeign provides declarative rest calls from a spring boot application to other microservices or third-party services, using familiar annotations.
Configure OpenFeign in student service to call address service via REST by adding Spring Cloud OpenFeign starter, centralize version in properties, and enable Feign clients in main class with package.
Create your first Feign client to call the address service from the student service, wiring the client by service name or properties and using get by id.
Learn how to use Feign client in a Spring Boot microservice to call the address service from the student service, test with Postman, and declare REST mappings for inter-service calls.
Understand service discovery and registry with the Eureka server for microservices. See how services register by name and other services call by name, updating automatically as instances move.
Create a springboard Eureka server project, add the Netflix Eureka Server dependency, configure port 8761, and enable the Eureka server annotation with application name Eureka Server.
Register microservices with the eureka server by adding spring cloud starter netflix eureka client dependencies, enabling @EnableEurekaClient in each service, and configuring the local eureka server url.
Start the Eureka server first, then start microservices so they register with Eureka and appear in the discovery UI at http://localhost:8761. Exclude the Eureka server from registration by updating properties.
Explore how a Eureka server enables microservices to discover and call the address service by its registered service name, via a client, with the UDCA server providing the registry.
Learn client-side load balancing using Spring Cloud Load Balancer to distribute requests across multiple address service instances, guided by Eureka registry and round-robin routing.
Configure Spring Cloud load balancer for the address Feign client in the student service by adding the load balancer starter and a config class with @LoadBalancerClient for the address service.
Test client-side load balancing in a microservices setup using spring cloud load balancer and Eureka, with multiple address service instances, and observe requests distributed across instances via logs.
***** Some Reviews From Students *****
Really its worth for me, he is explained very well and given examples for understanding.
It's a great course for Microservices with Spring Cloud.
yes it is good matching for me.
Very amazing course, whatever topics are covered by the instructor that is very easy to understand. Finally this course deserve 5 ratings.
This course is all about Microservices with Spring Boot and Spring Cloud.
If you are working with Spring Boot and building REST APIs then this course is for you. Having microservices is the new trend.
In this course before jumping to microservices first you will understand what is monolithic application ?
We will create microservices out of monolithic application so that you have better idea how to break your application and create microservices out of it.
After that you will learn to use WebClient to make REST calls between your microservices. You might have used Rest Template but that is now deprecated and Spring 5 onwards it is not recommended to use.
There is another better open to make REST calls from Spring Boot Apps and that is Spring Cloud OpenFeign REST Client. It provides decalrative way to make REST calls from Spring Boot Apps.
Service Discovery & Registry is very important while working with microservices. This course covers Spring Cloud Eureka to register microservices so that we do not need to worry about URLs of different microservices.
Load Balancing is key when you have huge traffic and multiple instances for microservices. In this course we will achieve Client Side Load Balancing with Spring Cloud LoadBalancer.
Earlier Spring was providing Spring Cloud Netflix Ribbon to achieve client side load balancing but now its been deprecated and Spring Cloud Load Balancer is being used.
While working with microservices how to handle cross cutting concerns like Authentication, logging request and response ?
This can be achieved by Spring Cloud API Gateway. API Gateway is entry point for all microservices that you have. You will learn to have Pre and Post filters in API Gateway.
Earlier Spring was providing Zuul API Gateway but now its been deprecated and Spring Cloud API Gateway is being used.
What if one of your microservices is down ?
Here comes the importance of Fault Tolerance. This course covers practical implementation of Fault Tolerance & Circuit Breaker using Resilience4j. It also covers real world example of Circuit Breaker. Resilience4j internally uses Spring AOP ( Aspect Oriented Programming )
Earlier Spring was providing Spring Cloud Hystrix but now its been deprecated and Resilience4j is being used.
How to trace down a particular request ?
When your microservices are calling each other it becomes hard to identity where is the issue. But do not worry here comes Sleuth and Zipkin for that purpose. We can have Distributed Tracing with Sleuth and Zipkin. Zipkin Server provides UI to trace down the request.
Centralizing property files and having environment specific property file is needed for each microservice. This can be achieved using Spring Cloud Config Server. This course covers practical implementation of Spring Cloud Config Server using Git.
Below are the topics that this course covers -
Monolithic Vs Microservice
WebClient To Make REST Calls
Spring Cloud OpenFeign REST Client
Spring Cloud Eureka - Service Discovery & Registry
Client Side Load Balancing with Spring Cloud LoadBalancer
Spring Cloud API Gateway with Pre and Post Filters
Fault Tolerance & Circuit Breaker with Resilience4j
Distributed Tracing with Sleuth and Zipkin
Spring Cloud Config Server
For this course you can use any database and any method to connect your database from your Spring Boot App. For example I will use MySQL database using Spring Data JPA in this course.
Course Topics & Lectures :-
Introduction
Introduction
Setting Up Environment
JDK, Maven and STS Installation
Postman (REST Client) Installation
MySQL Installation
Introduction To Microservice
What is Monolithic Application ?
What is Microservice ?
Introduction To Spring Cloud
What is Spring Cloud ?
Spring Cloud Projects and Its Usage
Default Ports
Getting Ready with Microservices
Database Tables and Structure
Monolithic Application
Address Microservice
Create Address Microservice
Configure Address Microservice
Add REST APIs To Address Microservice
Address Microservice In Action
Student Microservice
Create Student Microservice
Configure WebClient
Calling Address Microservice From Student
Student Microservice In Action
Spring Cloud OpenFeign REST Client
What is Open Feign and Why we need it ?
Configure Open Feign In Microservice
Creating First Feign Client
Feign Client In Action