4.51 sur 5
4.51

Spring Boot Microservices and Spring Cloud

Learn to build RESTful Microservices with Spring Boot and Spring Cloud
Build and run RESTful Microservices
Implement User Authentication
Eureka Discovery Service
Implement User Authorization with Spring Security and JWT
Spring Cloud API Gateway
Learn to use JPA to persist data into a Database
Cloud Cloud Config Server
Learn to install MySQL Server and persist data into MySQL
Spring Cloud Bus and Rabbit MQ
H2 in-memory database and H2 Console
Spring Boot Actuator
Learn to use HTTP Postman
Use Spring Security
Learn to use Spring Initializer
Distributed Tracing with Sleuth and Zipkin
Learn to use Spring Tool Suite
Centralized Logging with ELK Stack(Logstash, Elasticsearch, Kibana)
Run Microservices in Docker Containers

This video course is for Beginners who have never build RESTful Web Services and Microservices before. It will guide you step-by-step through basics and will help you create and run RESTful Microservices from scratch. You will learn how to run Microservices on your own developer’s machine as well as in Docker Containers on AWS EC2 Linux machines.

By the end of this course, you will have your own RESTful Spring Boot Microservices built and running in Spring Cloud.

You will learn how to create and run your own: 

  • RESTful Microservices,

  • Eureka Discovery Service,

  • Zuul API Gateway,

  • Spring Cloud API Gateway,

  • Load Balancer,

  • Spring Cloud Config Server,

You will learn to use:

  • Spring Cloud Bus and Rabbit MQ,

  • Spring Boot Actuator

You will also learn how to implement for your REST API features like: 

  • User Authentication(Login) and,

  • User Authorization(Registration)

You will learn to use: 

  • Spring Security and JWT

You will learn how to use: 

  • Spring Data JPA to store user details in a database,

  • H2 in-memory database and a database console,

  • MySQL database server,

  • Postman HTTP Client,

  • Spring Tool Suite,

  • Spring Initializer

This course also covers how to:

  • Trace HTTP Requests with Spring Cloud Sleuth and Zipkin(Distributed tracing)

  • Aggregate log files in one place(Centralized logging) with ELK stack(Logstash, Elasticsearch, Kibana).

You will also learn how to: 

  • Start up AWS EC2 Linux machine,

  • Install Docker,

  • Create Docker images,

  • Run Microservices in Docker containers on multiple EC2 Linux machines in Amazon AWS Cloud.

Introduction

1
Source Code
2
Course Overview
3
A few suggestions
4
What is a Microservice?
5
Sample Microservices Architecture
6
Download and Install Postman HTTP Client
7
Postman Overview
8
Resource and Collection URIs
9
HTTP Methods: GET, POST, DELETE and PUT
10
HTTP Headers: Accept and Content Type

Setting up Development Environment

1
Install Java Platform(JDK)
2
Download and Install Spring Tool Suite(STS)

Building RESTful Web Services - A Quick Start. (Optional)

1
Introduction
2
Creating a New Project
3
Creating a new Spring project using Spring Boot Initializr
4
Create Users Rest Controller class
5
Adding Methods to Handle POST, GET, PUT, DELETE HTTP requests
6
Running Web Service Application
7
Reading Path Variables with @PathVariable annotaion
8
Reading Query String Request Parameters
9
Making Parameters Optional or Required
10
Returning Java Object as Return Value
11
Returning Object as JSON or XML Representation
12
Set Response Status Code
13
Reading HTTP POST Request Body. The @RequestBody annotation.
14
Validating HTTP POST Request Body
15
Store Users Temporary
16
Handle HTTP PUT Request
17
Handle HTTP Delete Request
18
Handle an Exception
19
Return Custom Error Message Object
20
Handle a Specific Exception
21
Throw and Handle You Own Custom Exception
22
Catch More Than One Exception with One Method
23
Dependency Injection: Create and Autowire a Service Layer Class
24
Constructor Based Dependency Injection
25
Run Web Service as a Standalone Application

Eureka Discovery Service - A Quick Start

1
Introduction to Eureka Discovery Service
2
Startup Eureka Service Discovery
3
Troubleshooting

Users Microservice - A Quick Start

1
Introduction to Building a Users Microservice
2
Users Microservice - Create new Spring Boot Project
3
Enable Spring Discovery Cloud Client
4
Create Users Rest Controller
5
Access Users Web Service Endpoint via Eureka Discovery Service
6
Exercise - Create Account Management Microservice

Account Management Microservice - A Quick Start

1
Introduction to Building an Account Management Microservice
2
Password Reset - Create a new Spring Boot Project
  • Create a new Spring Boot Project

  • Create a new RestController

  • Enable Eureka Discovery Client

3
Access Account Management Microservice via Eureka Discovery Service

Zuul API Gateway - A Quick Start

1
Important note
2
Introduction to Zuul API Gateway
3
Create a ZUUL API Gateway Project
4
Access Microservices via API Gateway

Zuul as a Load Balancer - A Quick Start

1
Important note
2
Load Balancer - Introduction
3
Starting Up More Microservices
4
Trying How Load Balancer Works

Spring Cloud API Gateway

1
Important Note
2
Introduction
3
Creating API Gateway Project
4
Automatic Mapping of Gateway Routes
5
Manually Configuring API Gateway Routes
6
Trying how it works
7
Rewriting URL Path
8
Automatic & Manual Routing
9
Build-In Predicate Factories
10
Gateway Filters

Spring Cloud API Gateway as a Load Balancer

1
Starting Up More Microservices
2
Trying How Load Balancer Works

H2 In-Memory Database

1
H2 In-memory Database. Introduction.
2
H2 Database Console Overview
3
Adding Support for the H2 Database

Users Microservice - Implementing User Sign up

1
Introduction
2
Adding method to handle HTTP Post Request
3
Implementing the Create User Request Model class
4
Validating HTTP Request Body
5
Application Layers
6
Implementing Service Layer Class
7
Create a Shared DTO Class
8
Generate Unique Public User Id
9
Adding Support for Spring Data JPA
10
Implementing User Entity Class
11
Implementing Spring Data JPA CRUD Repository
12
Save User Details in Database
13
Return Http Status Code
14
Implementing Create User Response Model
15
Add Spring Security to Users Microservice
16
Add WebSecurity Configuration
17
Encrypt User Password

- Add Spring Security support to pom.xml

- Disable Spring Security in Main Application class

- Use BCryptPasswordEncoder to Encode Password

18
Allow only IP address of Zuul API Gateway
19
Adding Support to Return JSON or XML

Users Microservice - Implementing User Login

1
Introduction
2
Implementing LoginRequestModel
3
AuthenticationFilter. Implementing attemptAuthentication()
4
Implementing loadUserByUserName()
5
AuthenticationFilter. Implementing successfulAuthentication().
6
Trying How User Login Works
7
Customize User Authentication URL

Enable Spring Security in Zuul API Gateway

1
Important note
2
Introduction to Spring Security on API Gateway
3
Adding Support for Spring Security and JWT Tokens
  • Create a new Spring Boot Project

  • Create a new RestController

  • Enable Eureka Discovery Client

  • Try how it works

4
Enable Web Security in Zuul
5
Allow Access to Registration and Login Urls
6
Implementing Authorization Filter
7
Accessing Protected Microservices with Access Token
  • Access Web Service Endpoint in /users

  • Access Web Service Endpoint in /account

Spring Cloud API Gateway - Creating a Custom Filter.

1
Introduction
2
Using Header Predicate
3
Adding Support for JWT Token Validation
4
Creating AuthorizationFilter class
5
Assign Custom Filter to a Gateway Route
6
Signup and Login Routes
7
Reading Authorization HTTP Header
8
Validating JWT Access Token
9
Accessing Protected Microservices with Access Token

Spring Cloud API Gateway Global Filters

1
Introduction
2
Creating Global Pre Filter
3
Accessing Request Path and HTTP Headers
4
Trying how Pre Filter Works
5
Creating Global Post Filter
6
Trying how the Post Filter works
7
Defining Filters in a Single Class
8
Ordering Global Filters
9
Trying how ordered filters work

Spring Cloud Config Server - Git Backend

1
Introduction to Spring Cloud Config Server
2
Create Your Own Config Server
3
Create Private GitHub Repository
4
Naming Property Files Served by Config Server
5
Configure Config Server to Access Private GitHub Repository
6
Adding Properties File to Git Repository
7
Configure Users Microservice to be a Client of Config Server
8
Make Zuul Gateway a Client of Config Server

Spring Cloud Bus - A Quick Start

1
Introduction to Spring Cloud Bus
2
Add Spring Cloud Bus & Actuator Dependencies
3
Enable the /bus-refresh URL Endpoint
4
Download and Run Rabbit MQ
5
Rabbit MQ Default Connection Details
6
Trying how Spring Cloud Bus Works
7
Change default Rabbit MQ Password

Spring Cloud Config - File System Backend

1
Introduction to Spring Cloud Config File System as a Backend
2
Setting up File System Backend
3
Previewing Values Returned by Config Server
4
Trying how Microservices work

Spring Cloud Config - Configuration for Multiple Microservices

1
Introduction
2
Shared and a Microservice specific properties

Spring Boot Actuator - A Quick Start

1
Introduction to Spring Boot Actuator
2
Add Spring Boot Actuator to API Gateway
3
Trying How It Works
4
Enable Actuator for Users Microservice

Using MySQL Instead of In-Memory Database

1
Introduction
2
Download and Install MySQL
3
Start MySQL Server and Login
4
Create MySQL Database And a New User
5
Downloading and Installing MySQL Workbench
6
Connect to MySQL Database using MySQL WorkBench
7
MySQL WorkBench brief overview
8
Configure MySQL Database Access Details
9
Use H2 Console to Access MySQL Database
10
Copy MySQL properties to a Config Server

Encryption and Decryption

1
Introduction to Encryption and Decryption of Configuration Properties
2
Add Java Cryptography Extension
3
Symmetric Encryption of Properties
4
Creating a Keystore for Asymmetric Encryption
5
Asymmetric Encryption of Properties

Microservices Communication

1
Introduction to Microservices Communication
2
Albums Microservices Source Code
3
Clone Source Code of Albums Microservice
4
A walk through an Albums Microservice
5
Implementing Get User Details
6
Make Users Microservice call Albums Microservice
7
Trying how it works
8
Feign Web Service Client - Introduction
9
Enable Feign in Spring Boot Project
10
Create Feign Client
11
Using Feign Client
12
Trying How Feign Client Works
13
Enable HTTP Requests Logging in Feign Client
14
Handle FeignException
15
Handle Response Errors with Feign Error Decoder
16
Hystrix Circuit Breaker & Feign. Introduction.
17
Configure Project to use Hystrix Circuit Breaker
18
Trying How Hystrix Circuit Breaker & Feign work
19
Error Handling with Feign Hystrix FallbackFactory

Distributed Tracing with Sleuth and Zipkin

1
Introduction to Distributed Tracing with Sleuth and Zipkin
2
Add Spring Cloud Sleuth to Users Microservice
3
Checking Trace ID and Span ID in a Console
4
Startup Zipkin Server
5
View Traces in Zipkin

Aggregating Log Files with ELK Stack

1
Introduction to Aggregating Log Files with ELK Stack
2
Configure Microservices to Log into a File
3
Download Logstash
4
Configure Logstash to Read Log Files
5
Download and Run Elasticsearch
6
Run Search Query
7
Download, Install and Run Kibana
8
View Aggregated Logs in Kibana

Secure Eureka Dashboard

1
Configure Spring Security to Eureka Server
2
Enable Web Security
3
Configure Eureka Clients to use Username and Password
4
Configure Eureka Service URL in Config Server
5
Move Username and Password to Config Server
6
Encrypting Username and Password

Running Microservices in Docker Containers to AWS EC2

1
Introduction to Running Microservices in Docker Containers
2
Start up a new Linux Server on AWS EC2
3
Connect to EC2 Instance
4
Docker Commands Used in this Video Course
5
Install Docker on AWS EC2
6
Docker Hub Introduction
7
Run RabbitMQ Docker Container
8
Basic Docker Commands: Run, Stop, Start, Remove Containers and Images

In this video lessons I explain how to use basic Docker commands to: 

  • Run a new Docker container,

  • Stop running Docker container,

  • Remove Docker container,

  • Remove Docker Image

You can use my Docker Commands Cheat Sheet for reference: http://appsdeveloperblog.com/docker-commands-cheat-sheet/

9
Create Config Server Docker Image
10
Publish Config Server Docker Image to Docker Hub
11
Run Config Server on EC2 from Docker Hub
12
Start New EC2 Instance for Eureka
13
Build Docker Image for Eureka Discovery Service
14
Run Eureka in Docker container
15
Elastic IP address for EC2 Instance
16
Create Zuul Api Gateway Docker Image
17
Run Zuul Api Gateway in Docker Container
18
Run Elastic Search in Docker container
19
Run Kibana in Docker Container
20
Run Kibana and Elastic Search on the same Network
21
Docker Image for Albums Microservice
22
Run Albums Microservice Docker Image on EC2
23
Logstash Docker Image for Albums Microservice
24
Run Logstash in Docker container
25
Run MySQL in Docker Container
26
Make MySQL Docker Container Persist Data on EC2
27
Build Users Microservice Docker Image
28
Run Users Microservice in Docker container
29
Run Logstash for Users Microservice

Multiple Environments: Dev, Prod.

1
Introduction
2
Preparing Configuration for another environment
3
Creating Beans Based on Spring Boot @Profile used
4
Running Docker Container for Different Environments

Downstream Microservice and Method-Level Security

1
Introduction
2
Pass Authorization Header to Downstream Microservice
3
Add AuthorizationFilter to Users Microservice
4
Configure HttpSecurity
5
Trying how it works
6
Introduction to Method-Level security
7
Enable Method-Level Security
8
@PreAuthorize annotation example
9
Trying how @PreAuthorize annotation works
10
@PostAuthorize annotation example

What's next

1
What's next?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.5
4.5 sur 5
Notes4246

Détails des Notes

Étoiles 5
2296
Étoiles 4
1544
Étoiles 3
313
Étoiles 2
55
Étoiles 1
38
b9681d038d37cd8b990511dc249286e7
Garantie de remboursement de 30 jours

Inclut

19 heures de vidéo à la demande
Accès complet à vie
Accès sur le mobile et la télévision
Certificat d'achèvement

Archive

Working hours

Monday 9:30 am - 6.00 pm
Tuesday 9:30 am - 6.00 pm
Wednesday 9:30 am - 6.00 pm
Thursday 9:30 am - 6.00 pm
Friday 9:30 am - 5.00 pm
Saturday Closed
Sunday Closed