Mô tả

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 Standalone Server,

  • Eureka Discovery Server Cluster,

  • 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),

  • Role-based access control(RBAC)

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.

Bạn sẽ học được gì

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

Use Cloud Cloud Config Server. Learn to Encrypt Sensitive Data.

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

Use Method Level Security to protect API Endpoints

Deploy Microservices to AWS

Yêu cầu

  • Know Java
  • Mac computer

Nội dung khoá học

38 sections

Introduction

11 lectures
Source Code
00:34
Course Overview
07:32
A few suggestions
03:29
What is a Microservice?
07:11
Sample Microservices Architecture
07:20
Download and Install Postman HTTP Client
04:48
Postman Overview
09:09
Resource and Collection URIs
11:12
HTTP Methods: GET, POST, DELETE and PUT
03:44
HTTP Headers: Accept and Content Type
04:12
Introduction to Spring Boot Microservices - Quiz
5 questions

Setting up Development Environment

2 lectures
Install Java Platform(JDK)
05:48
Download and Install Spring Tool Suite(STS)
03:26

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

27 lectures
Introduction
00:41
Creating a New Project
06:12
Creating a new Spring project using Spring Boot Initializr
04:42
Create Users Rest Controller class
02:45
Adding Methods to Handle POST, GET, PUT, DELETE HTTP requests
03:13
RestController and Request Mapping Annotations - Quiz
3 questions
Running Web Service Application
04:36
Reading Path Variables with @PathVariable annotaion
03:31
Reading Query String Request Parameters
04:51
Making Parameters Optional or Required
04:35
HTTP Request Parameters - Quiz
3 questions
Returning Java Object as Return Value
04:11
Returning Object as JSON or XML Representation
05:35
Set Response Status Code
04:58
Reading HTTP POST Request Body. The @RequestBody annotation.
08:13
Validating HTTP POST Request Body
08:56
Store Users Temporary
04:50
Handle HTTP PUT Request
09:06
Handle HTTP Delete Request
04:52
Handle an Exception
07:44
Return Custom Error Message Object
05:35
Handle a Specific Exception
03:06
Throw and Handle You Own Custom Exception
04:13
Catch More Than One Exception with One Method
02:54
Dependency Injection: Create and Autowire a Service Layer Class
10:54
Constructor Based Dependency Injection
06:24
Run Web Service as a Standalone Application
04:52

Eureka Discovery Service - A Quick Start

4 lectures
Introduction to Eureka Discovery Service
04:29
[Updated] Create Eureka Discovery Server project
06:20
[Updated] Configure Eureka Discovery as Standalone Server
06:21
Source code
00:07

Users Microservice - A Quick Start

6 lectures
Introduction to Building a Users Microservice
02:10
Users Microservice - Create new Spring Boot Project
03:40
Enable Eureka Client
03:01
Create Users Rest Controller
02:04
Access Users Web Service Endpoint via Eureka Discovery Service
02:59
Exercise - Create Account Management Microservice
00:09

Account Management Microservice - A Quick Start

3 lectures
Introduction to Building an Account Management Microservice
01:34
Create a new Spring Boot Project
03:59
Access Account Management Microservice via Eureka Discovery Service
02:56

[Deprecated] Zuul API Gateway - A Quick Start

4 lectures
Important note
01:48
Introduction to Zuul API Gateway
03:24
Create a ZUUL API Gateway Project
03:37
Access Microservices via API Gateway
04:14

[Deprecated] Zuul as a Load Balancer - A Quick Start

4 lectures
Important note
00:04
Load Balancer - Introduction
00:50
Starting Up More Microservices
08:58
Trying How Load Balancer Works
04:47

Spring Cloud API Gateway

10 lectures
Important Note
01:43
Introduction
06:27
Creating API Gateway Project
05:07
Automatic Mapping of Gateway Routes
06:49
Manually Configuring API Gateway Routes
07:49
Trying how it works
04:08
Rewriting URL Path
05:06
Automatic & Manual Routing
01:57
Build-In Predicate Factories
03:30
Gateway Filters
00:10

Spring Cloud API Gateway as a Load Balancer

2 lectures
Starting Up More Microservices
08:58
Trying How Load Balancer Works
03:53

H2 In-Memory Database

3 lectures
H2 In-memory Database. Introduction.
03:19
H2 Database Console Overview
07:40
Adding Support for the H2 Database
04:43

Users Microservice - Implementing User Sign up

21 lectures
Introduction
00:41
Source Code
00:06
Adding method to handle HTTP Post Request
01:14
Implementing the Create User Request Model class
03:17
Validating HTTP Request Body
04:16
Application Layers
02:48
Implementing Service Layer Class
02:10
Create a Shared DTO Class
03:15
Generate Unique Public User Id
02:16
Adding Support for Spring Data JPA
02:01
Implementing User Entity Class
06:07
Implementing Spring Data JPA CRUD Repository
02:34
Save User Details in Database
11:15
Return Http Status Code
02:29
Implementing Create User Response Model
04:30
Add Spring Security to Users Microservice
01:15
[Updated] Add WebSecurity Configuration
08:43
[Updated] Encrypt User Password
06:26
[Updated] Allow Requests from API Gateway Only
04:50
Trying how it works
04:15
[Updated] Adding Support to Return XML
04:17

Users Microservice - Implementing User Login

12 lectures
Introduction
01:10
Source code
00:04
Implementing LoginRequestModel
01:21
[Updated]AuthenticationFilter. Implementing attemptAuthentication()
05:25
Register Authentication Filter with HTTP Security
03:05
Implementing loadUserByUsername() method
10:30
successfullAuthentication(): Get User Details.
07:10
successfullAuthentication(): Adding JWT Dependencies
02:13
sucessfullAuthentication(): Generate JWT
07:05
Configure API Gateway route to /login
02:39
[Updated] Trying how /login works
04:53
[Updated] Customize User Authentication URL
04:36

[Deprecated] Enable Spring Security in Zuul API Gateway

7 lectures
Important note
00:03
Introduction to Spring Security in Zuul API Gateway
01:53
Zuul API Gateway: Adding Support for Spring Security and JWT Tokens
01:17
Enable Web Security in Zuul
04:29
Allow Access to Registration and Login Urls
05:06
Implementing Authorization Filter
08:43
Accessing Protected Microservices with Access Token
05:22

Spring Cloud API Gateway - Creating a Custom Filter.

10 lectures
Introduction
03:10
Source code
00:04
Using Header Predicate
04:04
[Updated]Adding Support for JWT Token Validation
02:27
Creating AuthorizationFilter class
03:49
Assign Custom Filter to a Gateway Route
01:12
Signup and Login Routes
03:05
Reading Authorization HTTP Header
07:42
[Updated] Validating JWT Access Token
08:39
Accessing Protected Microservices with Access Token
06:39

Spring Cloud API Gateway Global Filters

9 lectures
Introduction
01:02
Creating Global Pre Filter
03:51
Accessing Request Path and HTTP Headers
03:32
Trying how Pre Filter Works
03:49
Creating Global Post Filter
03:05
Trying how the Post Filter works
02:38
Defining Filters in a Single Class
06:41
Ordering Global Filters
06:42
Trying how ordered filters work
02:22

Spring Cloud Config Server - Git Backend

8 lectures
Introduction to Spring Cloud Config Server
04:03
Create Your Own Config Server
02:53
Create Private GitHub Repository
02:24
Naming Property Files Served by Config Server
02:32
Configure Config Server to Access Private GitHub Repository
02:46
Adding Properties File to Git Repository
03:16
Configure Users Microservice to be a Client of Config Server
07:24
Make Zuul Gateway a Client of Config Server
02:18

Spring Cloud Bus - A Quick Start

7 lectures
Introduction to Spring Cloud Bus
03:52
Add Spring Cloud Bus & Actuator Dependencies
02:27
Enable the /busrefresh URL Endpoint
01:47
Download and Run Rabbit MQ
03:20
Rabbit MQ Default Connection Details
02:15
Trying how Spring Cloud Bus Works
08:37
Change default Rabbit MQ Password
03:29

Spring Cloud Config - File System Backend

4 lectures
Introduction to Spring Cloud Config File System as a Backend
00:45
Setting up File System Backend
04:51
Previewing Values Returned by Config Server
01:41
Trying how Microservices work
02:38

Spring Cloud Config - Configuration for Multiple Microservices

2 lectures
Introduction
02:31
Shared and a Microservice specific properties
07:01

Spring Boot Actuator - A Quick Start

8 lectures
Introduction to Spring Boot Actuator
02:44
[Updated] Add Spring Boot Actuator to Spring Cloud Gateway
02:00
Enable Actuator's /gateway and /mappings endpoints
03:46
View Spring Cloud API Gateway Routes using Actuator
03:25
Actuator Documentation Links
00:06
Enable Actuator for Users Microservice
04:01
Trying how Actuator works in Users Microservice
03:02
Actuator /httpexchanges endpoint
05:25

Using MySQL Instead of In-Memory Database

10 lectures
Introduction
01:00
Download and Install MySQL
03:16
Start MySQL Server and Login
06:14
Create MySQL Database And a New User
06:25
Downloading and Installing MySQL Workbench
03:02
Connect to MySQL Database using MySQL WorkBench
05:26
MySQL WorkBench brief overview
04:15
Configure MySQL Database Access Details
09:48
Use H2 Console to Access MySQL Database
02:48
Copy MySQL properties to a Config Server
01:40

Encryption and Decryption

6 lectures
Introduction to Encryption and Decryption of Configuration Properties
02:43
A note about Java Cryptography Extension(JCE)
00:23
Add Java Cryptography Extension
06:14
Symmetric Encryption of Properties
08:50
Creating a Keystore for Asymmetric Encryption
05:05
Asymmetric Encryption of Properties
05:25

Microservices Communication

15 lectures
Introduction to Microservices Communication
03:48
Albums Microservices Source Code
00:11
Clone Source Code of Albums Microservice
02:11
A walk through an Albums Microservice
05:37
Implementing Get User Details
05:43
Make Users Microservice call Albums Microservice
10:25
Trying how it works
03:59
Feign Web Service Client - Introduction
01:32
Enable Feign in Spring Boot Project
01:54
Create Feign Client
05:07
Using Feign Client
01:47
Trying How Feign Client Works
03:11
Enable HTTP Requests Logging in Feign Client
05:41
Handle FeignException
04:36
Handle Response Errors with Feign Error Decoder
12:57

[Deprecated] Microservices communication - Hystrix Circuit Breaker

4 lectures
Introduction
02:55
Configure Project to use Hystrix Circuit Breaker
04:28
Trying How Hystrix Circuit Breaker & Feign work
03:10
Error Handling with Feign Hystrix FallbackFactory
11:05

Microservices communication. Resilience4j - Circuit Breaker.

8 lectures
Introduction
07:54
Removing Hystrix Circuit Breaker
02:41
Adding Resilience4j
03:16
Actuator /health Endpoint
02:32
Feign Client & Circuit Breaker Fallback method
04:22
Circuit Breaker configuration properties
07:04
Configure Access to Actuator endpoints
04:50
Monitoring Circuit Breaker events in Actuator
07:26

Microservices communication. Resilience4j - Retry.

4 lectures
@Retry annotation
01:36
Aspect Order
03:12
Configuration properties
03:02
Trying how it works
03:52

Distributed Tracing with Micrometer and Zipkin

9 lectures
[Updated]Introduction to Distributed Tracing with Micrometer and Zipkin
03:43
[Updated] Starting up Zipkin
03:18
[Updated]Add Micrometer and Zipkin dependencies
04:35
Micrometer Tracing Sampling Probability
02:16
Logging TraceId and SpanId
03:32
Configure Micrometer to work with Feign
01:48
[Practice exercise] Configure Micrometer in Albums Microservice.
00:35
View traces in Zipkin Dashboard
06:18
Trace Requests Sent with RestTemplate
05:32

Aggregating Log Files with ELK Stack

9 lectures
Introduction to Aggregating Log Files with ELK Stack
02:04
Configure Microservices to Log into a File
02:55
Download Logstash
01:39
Configure Logstash to Read Log Files
09:11
[New]Download and Run Elasticsearch with Security Enabled
05:56
[New]Configure Elasticsearch Security in Logstash
05:04
Run Search Query
06:50
[Updated]Download, Install and Run Kibana
04:58
[Updated]View Aggregated Logs in Kibana
05:31

Secure Eureka Dashboard

7 lectures
Source code
00:03
Configure Spring Security to Eureka Server
02:15
[Updated] Enable Web Security
05:23
Configure Eureka Clients to use Username and Password
03:10
Configure Eureka Service URL in Config Server
04:19
Move Username and Password to Config Server
04:00
Encrypting Username and Password
06:03

Running Microservices in Docker Containers to AWS EC2

29 lectures
Introduction to Running Microservices in Docker Containers
07:59
Start up a new Linux Server on AWS EC2
14:56
Connect to EC2 Instance
04:46
Docker Commands Used in this Video Course
00:57
Install Docker on AWS EC2
01:51
Docker Hub Introduction
01:57
Run RabbitMQ Docker Container
09:12
Basic Docker Commands: Run, Stop, Start, Remove Containers and Images
06:49
Create Config Server Docker Image
09:48
Publish Config Server Docker Image to Docker Hub
04:27
Run Config Server on EC2 from Docker Hub
10:22
Start New EC2 Instance for Eureka
03:23
Build Docker Image for Eureka Discovery Service
04:01
Run Eureka in Docker container
11:20
Elastic IP address for EC2 Instance
04:41
Create Zuul Api Gateway Docker Image
04:41
Run Zuul Api Gateway in Docker Container
08:03
Run Elastic Search in Docker container
05:55
Run Kibana in Docker Container
06:34
Run Kibana and Elastic Search on the same Network
04:31
Docker Image for Albums Microservice
04:27
Run Albums Microservice Docker Image on EC2
10:49
Logstash Docker Image for Albums Microservice
08:50
Run Logstash in Docker container
04:34
Run MySQL in Docker Container
08:37
Make MySQL Docker Container Persist Data on EC2
03:19
Build Users Microservice Docker Image
04:22
Run Users Microservice in Docker container
09:59
Run Logstash for Users Microservice
07:51

Multiple Environments: Dev, Prod.

4 lectures
Introduction
05:09
Preparing Configuration for another environment
08:31
Creating Beans Based on Spring Boot @Profile used
11:32
Running Docker Container for Different Environments
01:02

Downstream Microservice and Method-Level Security

10 lectures
Introduction
06:30
[Zuul Only] Pass Authorization Header to Downstream Microservice
01:22
[Updated] Create and register the AuthorizationFilter
09:24
[Updated]Register Authorization Filter with HTTP Security
02:53
[Updated] Trying how it works
04:28
Introduction to Method-Level security
04:55
[Updated] Enable Method Level Security
02:27
@PreAuthorize annotation example
03:30
Trying how @PreAuthorize annotation works
03:02
@PostAuthorize annotation example
07:11

Role-based Access Control in Microservices

33 lectures
Introduction to Roles and Authorities
05:27
Source code
00:04
Authentication & Authorization
02:13
Global Authentication and Global Authorization(OAuth)
01:58
Global Authentication and Global(API Gateway) Authorization
02:55
Global Authentication but Local Authorization
04:18
How it currently works & what we need to do next
04:14
Database Tables Design for Roles and Authorities
01:36
Creating @ManyToMany mapping between Users and Roles
06:54
Creating RoleEntity class
05:52
Creating a @ManyToMany mapping between Roles and Authorities
03:04
Creating an AuthorityEntity class
03:51
Creating RoleRepository JPA Interface
04:51
Creating AuthorityRepository JPA Interface
01:44
Initial Setup of Admin User & Roles - Introduction
03:00
Creating Java class to create initial Roles and Authorities
02:57
Creating Authorities: READ, WRITE, DELETE
04:03
Creating user roles: ROLE_USER and ROLE_ADMIN
05:08
Creating User with Admin Role
05:50
Trying how it works
03:30
Adding user Roles and Authorities to JSON Web Token(JWT)
12:40
Preview User Roles and Authorities in JSON Web Token(JWT)
04:36
JWT Claims Parser Maven Dependency - Introduction
01:48
Creating a new project for JWT Claims Parser
04:23
Convert JWT String into JWT Java object
05:52
Reading Roles and Authorities from JWT Object
03:32
Reading JWT Subject(userId)
01:18
Add JWT Authorities Project to Users Microservice
04:34
Update AuthorizationFilter class to use the new JwtClaimsParser class
04:12
SpEL: hasRole('ADMIN') - Only ADMIN user has access
06:32
SpEL: hasAuthority('PROFILE_DELETE')
03:35
Role-based Access Control(RBAC): Trying how it works in Users Microservice
06:17
Pass Authorization JWT from Users Microservice to Albums Microservice
07:50

Role-Based Access Control Exercise: Albums Microservice

7 lectures
Introduction
02:49
Instructions + Source Code
01:42
Albums Microservice. Eureka Client.
00:43
Albums Microservice: Config Server Configuration
01:48
Albums Microservice: Spring Cloud API Gateway Route
00:39
Albums Microservice: Add JwtAuthorities Maven Dependency
00:19
Spring Security for Albums Microservice
01:07

Role-base Access Control at the Spring Cloud API Gateway level

10 lectures
Introduction
05:07
Source code
00:04
Reviewing Gateway Filter class
04:28
Reading Roles and Authorities from JWT
05:29
Sending Arguments(ROLE) to a Filter class
04:37
Sending Arguments(Authority) to a Filter class
05:38
Trying how it works
05:59
Passing multiple roles and authorities as a single in-line argument
06:51
Multiple arguments: Trying how it works
08:11
Include error message in Response Body of Spring Cloud API gateway
02:13

Eureka Server Cluster

11 lectures
Introduction
03:30
Source code
00:04
Creating New Eureka Server Project
04:30
Eureka Cluster and Peer Awareness Configuration
07:34
Eureka Cluster Peer 2 Configuration
03:39
Eureka Cluster Peer 3 Configuration
02:19
Eureka Cluster: Update Hosts File
05:01
Staring up Eureka Discovery Server Cluster
03:59
Eureka Server Dashboard: Checking Registered Peers
04:14
Eureka Discovery Client with Default Configuration
08:16
Register Eureka Client with Eureka Cluster
04:19

What's next

1 lectures
Bonus lecture
02:23

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.