Skip to main content

Build Reactive RESTFUL APIs using Spring Boot/WebFlux

9h 34m 2s
English
Paid

Master Reactive Programming and RESTFUL APIs with Spring Boot/WebFlux. Dive deep into the world of reactive programming with hands-on coding and theoretical insights, enabling you to build robust, non-blocking RESTFUL APIs using Spring WebFlux and Reactor.

Course Overview

This course offers an in-depth exploration of Reactive Programming and the development of Reactive RESTFUL APIs using Spring WebFlux. Designed to be hands-on, the course provides you with the skills to code effectively in a reactive paradigm.

Learning Objectives

  • Understand the principles and importance of Reactive Programming.
  • Develop reactive applications using Spring WebFlux and Reactor.
  • Implement Reactive APIs that interact seamlessly with databases.
  • Leverage WebClient for building non-blocking clients.
  • Gain proficiency in writing and running JUnit tests for reactive components.

Why Choose Reactive Programming?

Explore why reactive programming is becoming essential in modern applications. This section contrasts the Spring MVC model with reactive approaches, discussing its limitations and the advantages offered by a reactive system.

Understanding Reactive Programming

  • Introductory concepts and benefits of Reactive Programming.
  • A snapshot of how reactive programming functions using simple examples.
  • An introduction to the Reactive Streams Specification and popular libraries.

Getting Started with Project Reactor

Dive into the Project Reactor library to understand the reactive types, Flux and Mono, through practical examples.

Course Setup

Set up your project with Spring Initializr, preparing your development environment for success.

Hands-On Reactive Programming

Engage with Flux and Mono through live coding sessions and learn to implement JUnit testing for these reactive streams.

Building Non-Blocking RESTFUL APIs

Annotated Controllers

  • Create your first non-blocking RESTFUL API.
  • Learn the essentials of reactive API mechanisms.
  • Code solutions to return Flux/Mono from endpoints and conduct JUnit testing with WebTestClient.

Functional Web Approach

  • Develop APIs using the RouterFunction and HandlerFunction.
  • Conduct JUnit testing with focus on functional endpoints.

Advanced Topics

WebFlux & Netty Execution Model

  • Understand how WebFlux serves HTTP requests with Netty.
  • Explore advanced concepts including Channels and EventLoops.

Reactive Programming with Databases

  • Integrate MongoDB into your reactive applications.
  • Configure Spring Boot profiles and build sophisticated reactive repositories.

Exception Handling in WebFlux

  • Implement robust error handling in reactive APIs using both RestController and Functional Web approaches.
  • Master techniques with ExceptionHandler, ControllerAdvice, and WebExceptionHandler.

Working with WebClient

  • Explore interaction with reactive APIs using WebClient.
  • Perform HTTP operations and handle exceptions effectively.

Streaming and Real-Time Data

  • Implement server-side events (SSE) for real-time data streaming with MongoDB and Spring WebFlux.
  • Utilize Tailable Cursors and Capped Collections for continuous data flow.

Course Requirements

  • JDK 8 or above
  • An IDE such as IntelliJ or Eclipse
  • Knowledge of Spring Boot is recommended for optimal comprehension

Ideal Audience

  • Developers keen to explore Reactive APIs with Spring WebFlux.

Key Learning Outcomes

  • Identify problems solved by Reactive Programming.
  • Comprehend and apply Reactive Programming principles.
  • Build and test reactive REST APIs from scratch.
  • Develop non-blocking clients and solve real-world challenges with WebClient.

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 86 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 86 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Course Introduction
All Course Lessons (86)
#Lesson TitleDurationAccess
1
Course Introduction Demo
02:07
2
Prerequisites
01:04
3
Why Reactive Programming ?
08:59
4
Traditional Rest API Design - How it works ?
07:44
5
What is Reactive Programming ?
09:32
6
Reactive Streams Specification
07:58
7
Reactive Libraries
03:34
8
Introduction to Project Reactor
01:20
9
Reactor Types - Flux and Mono
07:31
10
Project Setup
07:11
11
Flux - How it works ?
12:15
12
Flux - Learn to write JUNIT Tests
10:17
13
Mono - How it works and write Junit Tests
04:44
14
Flux/Mono - Exploring Factory methods
16:39
15
Filtering a Reactive Stream
04:27
16
Transforming a Reactive Stream using map
08:28
17
Transforming a Reactive Stream using flatMap
17:17
18
Combining Reactive Streams
12:37
19
Handling Errors in a Reactive Stream
16:27
20
Infinite Reactive Stream
10:59
21
Back Pressure - How it works ?
14:23
22
Push/Pull Communication Model
01:09
23
Hot vs Cold Reactive Streams
08:10
24
Virtualizing Time in Junit
08:59
25
How to get help ?
01:55
26
Introduction to Spring Boot 2
03:17
27
Build the Simple Non Blocking API
09:34
28
Junit : Test for Non Blocking API using WebTestClient
15:56
29
Junit : Test for infinite Non Blocking Sequence API using WebTestClient
08:59
30
Build the simple Non Blocking API - Mono
04:08
31
Introduction to Functional Web in Spring WebFlux
02:13
32
Build the simple Non Blocking API using Handler and Router Functions
10:13
33
Junit : Test for Functional EndPoint using WebTestClient
08:09
34
Spring WebFlux - Behind the Scenes
07:38
35
Introduction to Netty - Channel, EventLoops
06:58
36
Netty - End to End, Threads, Execution Model
06:32
37
Application Overview
01:54
38
Setting up Mongo DB
05:18
39
Spring Profiles
09:36
40
Build the "Item" Document
03:03
41
Build the Reactive Item Mongo Repository
02:01
42
Reactive Mongo Repository operations using JUNIT - Read - Part1
12:23
43
Reactive Mongo Repository operations using JUNIT - Read - Part2
05:01
44
Reactive Mongo Repository operations using JUNIT - Custom Read Operation
05:10
45
Reactive Mongo Repository operations using JUNIT - Insert
05:05
46
Reactive Mongo Repository operations using JUNIT - Update
04:50
47
Reactive Mongo Repository operations using JUNIT - Delete
08:25
48
Build Artifact
06:12
49
Get All Items
06:48
50
Initialize the data using CommandLineRunner
08:23
51
Get All Items - JUNIT Test using WebTestClient - Part 1
09:34
52
Get All Items - JUNIT Test using WebTestClient - Part 2
05:40
53
Get a Single Item
06:57
54
Create an Item EndPoint
06:09
55
Delete an Item Endpoint
04:32
56
Update an Item Endpoint
05:19
57
Update an Item Endpoint - JUNIT
09:23
58
Setting up the Router Function and Handler Function for Item Reactive API
02:18
59
Get All Items - Functional Endpoint
05:13
60
Get All Items - JUNIT Test using WebTestClient
02:55
61
Get a Single Item - Functional Endpoint
07:38
62
Create an Item - Functional Endpoint
04:36
63
Delete an Item - Functional Endpoint
03:30
64
Update an Item - Functional Endpoint
06:39
65
Setting up the Item WebClient Project
06:16
66
Explore the retrieve() and exchange() in WebClient
10:53
67
Passing Path Variable using WebClient
06:26
68
Post call using WebClient
05:39
69
PUT call using WebClient
06:24
70
Delete call using WebClient
03:53
71
Handling Exceptions using @ExceptionHandler
08:13
72
Handling Exceptions using @ControllerAdvice
03:06
73
Handling Exceptions in Controller - JUNIT
02:48
74
Default Exception Behavior - Functional Web
05:01
75
Handling Exceptions using AbstractErrorWebExceptionHandler
06:41
76
Handling Exceptions in Functional Web - JUNIT
02:54
77
Handling Errors in WebClient - retrieve()
08:08
78
Handling Errors in WebClient - exchange()
05:08
79
What is a Streaming EndPoint ?
02:35
80
Setting up the Capped Collection - MongoDB
05:08
81
Build the Reactive ItemCapped Mongo Repository
02:28
82
Initialize the data using CommandLineRunner
06:45
83
Build the Stream Endpoint using Controller
05:29
84
JUNIT Test for Streaming endpoint using Controller
07:54
85
Build the Stream Endpoint using Functional Web
05:38
86
JUNIT Test for Streaming endpoint using Functional Web
02:40
Unlock unlimited learning

Get instant access to all 85 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription