RESTful Web Services, Java, Spring Boot, Spring MVC and JPA

25h 11m 7s
English
Paid
November 21, 2023

This video course also covers the H2 in-memory database and teaches how to build RESTful Web Service that stores data in a database without a need to install MySQL or any other database server. You will also learn how to use H2 console to preview data stored in an in-memory database tables or in a MySQL database server. When it comes to storing data in a database you will learn how to use Spring Data JPA Query Methods as well as Native SQL Queries.

More

This is a very practical video course aimed at beginner Java developers to help them build their very first RESTful Web Service application with Java, Spring MVC, Spring Boot and Spring Data JPA to implement features like: 

  • User sign-up and User sign-in, 

  • Email verification,

  • Password Reset,

  • Get user details API call, 

  • Get list of users API call and implement Pagination, 

  • Update user details and Delete user details API calls, 

  • Learn to secure Web Service endpoints with Spring Security

  • Learn to use Amazon AWS Simple Email Service(SES) to send and request to confirm user email address, 

  • and learn to generate and include the JSON Web Token in HTTP Request.

Students will learn how to use Postman HTTP client software to send: HTTP POST, GET, DELETE and PUT requests, as well as how to set needed HTTP Headers. We will also cover how to: 

  • Send data to your RESTful WebService via HTTP Body and,

  • How to pass data via URL Query String and as a Path parameter,

  • How to enable your RESTful Web Service to respond to Cross Origin AJAX HTTP Requests.

You will also learn how to make your RESTful Web Service accept and respond back with JSON or XML media type.

This video course you will learn how to: 

  • Download and install Spring Tool Suite(STS), 

  • Download and install MySQL server and MySQL Workbench GUI, 

  • Download and run Apache Tomcat,

  • Add a specific Apache Tomcat Version to your Spring Tool Suite, 

  • User Maven to build and run your project as well as package it into a deployable WAR file, 

  • You will also learn how to run your Web Service as a stand along Java application with build-in Tomcat, 

  • Deploy your RESTful Web Service to Apache Tomcat as well as, 

  • Start up your own Amazon AWS EC2 Service in Amazon Cloud, install Java, MySQL, Tomcat and deploy RESTful Web Service to your very own cloud server. 

You will also learn how to use JUnit 5 to test your code and how to use one of the most popular test frameworks called Rest Assured to test RESTful Web Service endpoints of your REST Api.

Requirements:
  • Basic knowledge of Java
  • Mac computer
Who this course is for:
  • Beginner Java developers
  • Java developers interested in learning how to Build, Deploy RESTful Web Services
  • Java developers interested in learning how to Test Rest API with Rest Assured framework

What you'll learn:

  • Build a RESTful Web Service with Spring MVC and Spring Boot
  • Learn how to implement User Sign-in functionality
  • Learn how to implement User Sign-up functionality
  • Protect RESTful Web Service with Spring Security Framework
  • Learn how to implement Token-Based Authentication
  • Implement Password Reset and Email Verification features
  • Use Spring Data JPA Query Methods
  • Use Spring Data JPA Native SQL Queries
  • Download and Install MySQL Server on Mac
  • Download and Install MySQL Workbench
  • Download and Install Spring Tool Suite
  • Create new project using Spring Tool Suite and Spring Initializer
  • Download, run and stop Apache Tomcat
  • Deploy RESTful Web Service application to Apache Tomcat
  • Run RESTful Web Service application as a stand along Java application
  • Build and run REST API with Maven
  • Use Postman HTTP client to send HTTP Request to a Web Service endpoints
  • Start up Amazon EC2 server
  • Install Java, MySQL and Apache Tomcat on Amazon AWS EC2 server
  • Deploy RESTful Web Service to Amazon AWS EC2 server
  • Use H2 in-memory database
  • Use H2 database console to preview data in memory database as well as in a stand along MySQL database server
  • Use JUnit 5 to test code
  • Use Rest Assured to test RESTful Web Service endpoint

Watch Online RESTful Web Services, Java, Spring Boot, Spring MVC and JPA

Join premium to watch
Go to premium
# Title Duration
1 Install HTTP client Postman 02:10
2 Postman overview 10:42
3 Resource and Collection URIs 11:13
4 HTTP Methods: GET, POST, DELETE and PUT 03:45
5 HTTP Headers: Accept and Content Type 04:14
6 Introduction to Web Service Application Layers 04:30
7 A few suggestions 03:24
8 Downloading and Installing MySQL on MAC 03:17
9 Start MySQL Server and Login 06:15
10 Creating MySQL Database and a new User 06:26
11 Downloading and Installing MySQL Workbench 03:03
12 Connect to MySQL Database using MySQL WorkBench 05:28
13 MySQL WorkBench brief overview 04:16
14 Install Java Platform (JDK) 05:49
15 Download and Install Spring Tool Suite(STS) 01:56
16 Create new Spring Boot Project with Spring Tool Suite 06:13
17 Creating a new Spring project using Spring Boot Initializr 04:43
18 Create Users Rest Controller class 02:46
19 Adding Methods to Handle POST, GET, PUT, DELETE HTTP requests 03:14
20 Running Web Service Application 04:37
21 Update POM.XML file 06:17
22 Configure MySQL Database Access Details 04:27
23 Adding method to handle HTTP Post Request 02:21
24 Implementing the Create User Request Model class 03:22
25 Implementing Create User Response Model 06:06
26 Implementing the UserDto 04:39
27 Making use of UserRest and UserDto in RestController 03:20
28 Implementing Service class method 03:58
29 Implementing UserEntity class 06:14
30 Set Default Value for Email Verification Status field 01:08
31 Implementing UsersRepository class 05:33
32 Autowire UserRepository into Service class 05:01
33 Trying how the User Sign up works 06:13
34 Preventing Duplicate Entries with @Column(unique=true) 03:47
35 Check if user already exists 06:20
36 Generate User Public ID 06:31
37 Adding Spring Security to our project 05:23
38 Encrypt User Password 02:54
39 Make the Sign-up Web Service Endpoint Public 08:52
40 Migrating from WebSecurityConfigurerAdapter 13:40
41 Implementing User Sign-in Request Model 01:57
42 Implementing Load User By Username 04:54
43 Implementing SecurityConstants class 02:37
44 Implementing Authentication Filter 09:26
45 Trying how user Sign-in works 05:50
46 Add public User ID to a Response Header 11:50
47 Customize User Authentication URL 03:02
48 Implementing Authorization Filter 08:26
49 Trying how User Authorization works 02:31
50 Making Your REST API Stateless 02:01
51 Reading Token Secret from a property file 10:00
52 Get User Details Resource Method 05:06
53 Implement Service layer method 03:09
54 Update UserRepository 04:00
55 Trying the Get User Details API Call 05:38
56 Update POM.XML 01:15
57 Responding with XML or JSON 07:20
58 Consuming XML or JSON 04:26
59 Introduction 02:41
60 Implementing ErrorMessages enum 05:40
61 Implementing UserServiceException 03:15
62 Handle a Specific Exception 06:57
63 Return Custom Error Object Representation 04:14
64 Handle All Other Exceptions 04:57
65 Update User Details Resource Method 05:49
66 Implementing Service Layer Method 05:39
67 Trying the Update User Details API Call 02:55
68 Delete User Resource Method 13:43
69 Implementing Service Layer Method 02:45
70 Trying the Delete User API Call 04:55
71 The Get Users Request URL 03:40
72 The Get Users Resource Method 05:39
73 Get Users Service Layer Method 06:02
74 Trying the Get Users API Call 05:53
75 Running Your Web Services App without STS 02:44
76 Create Context Path to Your Web Service 04:23
77 Run Your App as a Java application 04:35
78 Generating WAR file 04:26
79 Install Apache Tomcat on Windows 13:32
80 Downloading Apache Tomcat on Mac 02:14
81 Starting and Stopping Apache Tomcat 02:52
82 Creating a new Apache Tomcat User 02:40
83 Deploying Your Web Service to Apache Tomcat 04:42
84 Introduction 02:50
85 Startup Your Own Amazon EC2 Linux Server 17:50
86 Connect To Your Server via SSH 04:41
87 Update Server Software Packages and Update Java 03:35
88 Download & Install Apache Tomcat on AWS EC2 Linux Server 10:28
89 Configure remote access to Manager app 02:33
90 Configure Apache Tomcat Users 03:13
91 Download and Install MySQL Server on EC2 Linux Server 03:19
92 Installing MySQL on AWS Linux 2 AMI 05:50
93 Install MariaDb Server on EC2 Linux 2 AMI 04:44
94 Create Database and Add Database User 04:03
95 Deploy Our Web Service App on Apache Tomcat 03:53
96 Sending HTTP Request to a WebService Deployed on a Remote Server 03:28
97 Introduction 03:10
98 Amazon RDS - Creating MySQL Database 06:14
99 Security Group Configuration 02:31
100 Configure application to use MySQL deployed in RDS 03:32
101 Deploying WAR to AWS Elastic Beanstalk 02:31
102 Trying how it works 01:53
103 Introduction: @OneToOne, @OneToMany, @ManyToOne 08:27
104 Add List of Addresses to JSON Payload 03:37
105 Add List of Addresses to a UserDetailsRequestModel 03:47
106 Creating AddressDTO 03:02
107 A Better Way of Mapping DTO to an Entity and Entity to a DTO 03:23
108 Trying if Deep Objects Mapping Works 03:36
109 Create AddressEntity class 07:28
110 Add @OneToMany to UserEntity class 03:01
111 Generate Public Address Id 02:21
112 Updating Service class Java code 05:16
113 Trying How it Works: Creating a new User record 05:30
114 Include List of Addresses Into Response 03:56
115 Get List of Addresses Web Service Endpoint 08:06
116 Get List of Addresses Service Interface 02:09
117 Get List of Addresses Service Interface Implementation 03:48
118 Get List of Addresses Spring Data JPA Interface 07:47
119 Trying How the Get List of Addresses Works 03:40
120 API Call to Get a Single Address Details 06:40
121 Important house keeping message 01:07
122 Introduction 03:03
123 Adding HATEOAS Support to Our Project 03:06
124 Adding Links to the AddressRest Model 09:24
125 Using the methodOn() 05:25
126 Adding Links to a Get Addresses API Call 04:57
127 Applying HAL Format 08:13
128 Introduction 03:02
129 Adding HATEOAS support to our project 02:04
130 Adding Links. Representation Model. 10:03
131 Adding Links. Entity Model. 03:23
132 Building links with methodOn() 05:16
133 Returning a collection of resources with CollectionModel. 04:57
134 Adding links to embedded list of addresses 03:34
135 Introduction 04:57
136 Verify Email Address with Amazon SES 05:02
137 Moving Out of AWS SES Sandbox 05:05
138 Submit Support Ticket to Increate Sending Limits 02:10
139 Create AWS IAM Access Credentials 04:27
140 Creating Shared Credentials File 00:43
141 Add AWS Java SDK SES Maven Dependency 01:17
142 Spring Security. Make Email Verification a Public Web Service Endpoint. 02:32
143 The verifyEmailToken() RestController Method 04:49
144 The verifyEmailToken() Service Layer Function 04:12
145 The findUserByEmailVerificationToken() Data Layer Function 01:35
146 Checking if Email Verification Token Has Expired 03:52
147 Generate and Save the Email Verification Token 05:00
148 Prevent Users with Unverified Email Address to Login 04:50
149 Trying How it works 05:14
150 Create a new Web Project 03:02
151 Download Apache Tomcat and Add to Spring STS 03:46
152 Creating Email Verification Service Web Page 05:23
153 Reading JavaScript URL Request Parameters 02:54
154 The verifyToken() AJAX HTTP Get Request 04:11
155 Deploying REST API and Email Verification Service to a Local Tomcat 09:52
156 Trying Email Verification Feature on Local Server 08:18
157 Adding Code to Send Email 10:46
158 Deploying Email Verification to a Remote Amazon EC2 Linux Server 05:19
159 Trying Email Verification on Remote Server 08:19
160 Introduction 04:40
161 Password Reset Request RestController Method 05:03
162 Password Reset Request Service Layer Method 04:31
163 Generating Password Reset Token 03:32
164 Create PasswordResetTokenEntity & Password Reset Repository 06:21
165 Update AmazonSES Class with Code that Sends Email 07:45
166 Make the /password-reset-request Public 02:32
167 Trying How Password Reset Request Works 07:27
168 Password Reset HTML Page: Add Input fields 06:03
169 Password Reset HTML Page: Add jQuery 02:09
170 Password Reset HTML Page: Add the saveNewPassword() function 10:33
171 Add Content Type HTTP Header 03:06
172 Password Reset RestController Method 03:52
173 Password Reset Service Layer Method 07:59
174 Making Password Rest URL Public 01:54
175 Deploying RESTful Web Service and the Verification Service App 04:58
176 Trying How Password Reset Works 07:40
177 Introduction to Testing with JUnit & Mockito 04:20
178 Test Cases Source Code and Test Libraries Dependency 04:18
179 Creating a new JUnit 5 Test Case 04:39
180 Mocking Objects with Mockito @Mock 08:57
181 JUnit 5 Assertions. Asserting Successful Method Execution. 07:50
182 JUnit 5. Expect an Exception with assertThrows() 05:33
183 The testCreateUser() method. Mocking Objects. 10:13
184 Testing the createUser() Service Method 07:56
185 The testCreateUser() method. Adding more code. 14:47
186 doNothing(). Exclude Integration Code from Unit Test. 07:52
187 Assert an Exception is thrown in the createUser() method 04:03
188 Create a New Test Case 02:40
189 Create Mock Objects and Configure Methods Behaviour 06:39
190 Asserting with assertNotNull, assertEquals and assertTrue 03:37
191 Create a new JUnit Integration Test Case 06:13
192 Test the Generate UserId Method 04:14
193 Test If JWT Token Has Not Expired 06:10
194 Test the Expired JWT Token 05:43
195 What is H2 In-memory Database and Why Using It 03:20
196 H2 Database Console Preview 07:54
197 Adding Support for the H2 Database 08:00
198 Sign in to H2 In-Memory Database 05:01
199 Protect the H2 In-Memory Database with a Password 02:04
200 API Call to Create a New User and Preview User Details in an In-Memory Database 03:45
201 Introduction 03:56
202 Creating a new maven project 04:41
203 Add support for Rest Assured and JUnit 5 to your project 07:39
204 Create User API Call: Creating a Test Method 02:20
205 Create User API Call: Setting Request URL, Context Path and a Port number 03:18
206 Create User API Call: Create HTTP Post Request and Validate Response 08:40
207 Create User API Call: Running a Test Case 06:14
208 Create User API Call: Verify JSON Array with a list of Addresses 09:06
209 User Login API Call: Create Test Class 02:56
210 User Login API Call: Create Test Method 08:49
211 User Login API Call: Run Test Method 05:17
212 JUnit Test Methods ordering with @FixMethodOrder 04:31
213 Get User Details API Call: Create Test method 05:41
214 Get User Details API Call: Validating List of Addresses 04:12
215 Get User Details API Call: Use the pathParam() 01:21
216 Get User Details API Call: Running Test Method 03:36
217 Update User Details API Call: Create Test Method & HTTP Request 08:46
218 Update User Details API Call: Validating HTTP Response 07:05
219 Delete User Details API Call: Create Test Method 05:19
220 Delete User Details API Call: Run Test Method 02:40
221 Introduction. What If You Need to Run SQL Query? 02:29
222 Native SELECT SQL Query Example 04:47
223 JUnit Test to test Native SELECT SQL Query 10:40
224 Native SQL Query with Positional Parameters 08:27
225 Native SQL Query with Named Parameters 04:50
226 Log SQL Queries and Their Values in the Console 03:51
227 Using Advanced LIKE Expressions 05:59
228 Select Specific Columns from a Table 06:53
229 UPDATE SQL Query Example 08:32
230 JPQL Introduction 02:01
231 JPQL Select SQL Query 06:56
232 JPQL Query to Select Specific Fields Only 04:11
233 JPQL Update SQL Query 06:28
234 Do I Need To Enable CORS? 05:40
235 Send HTTP Request to Reproduce Cross Origin Issue 07:37
236 Enable Cross Origin Requests in Rest Controller 08:08
237 Global CORS configuration 05:17
238 Spring Security Configuration for CORS 13:27
239 Introduction 02:13
240 Add Swagger Dependencies 03:40
241 Create Swagger Configuration File 02:48
242 Enable Swagger URLs and View JSON Documentation 05:56
243 View API Documentation In Swagger UI 05:46
244 Add Authorization Header 07:03
245 Add /login endpoint 16:57
246 Upading API Documentation Information 06:57
247 Web Service Endpoints Additional Information 04:53
248 Share Your API with Others 01:26
249 Share Swagger UI URL 04:39
250 Introduction to Roles and Authorities 05:24
251 Authentication vs Authorization 07:32
252 Database Tables Design 02:56
253 User Roles @ManyToMany Mapping for User Entity 06:23
254 Create RoleEntity 04:48
255 Role Authority @ManyToMany Mapping for the RoleEntity 03:28
256 Create AuthorityEntity 05:52
257 Create Role Repository 03:02
258 Create Authority Repository 01:44
259 Creating Initial Roles, Authorities and Admin User 02:58
260 Create InitialUsersSetup Class 03:03
261 Creating Authorities: READ, WRITE, DELETE 05:40
262 Creating Roles: ROLE_ADMIN, ROLE_USER 07:09
263 Create User with Admin Role 07:31
264 Create User Principal Class 12:06
265 Update Authentication and Authorization Filters 06:26
266 Configure HttpSecurity to Use the ADMIN Role 10:00
267 Configure HttpSecurity to Use the DELETE_AUTHORITY 01:07
268 hasAnyRole() and hasAnyAuthority() 01:52
269 Method Level Security Introduction 04:22
270 Enable Global Method Security 01:41
271 @Secured Annotation Example 04:48
272 @PreAuthorize Annotation Example 03:22
273 Accessing Principal Object and Method Argument 05:50
274 Trying How It Works 03:36
275 @PostAuthorize Annotation Example 06:06
276 Assign ROLE_USER to a Regular User 11:39
277 Spring Web MVC - Overview 03:28
278 Creating Spring Web MVC project 06:42
279 Configure JSP & JSTL support 07:53
280 Configure Thymeleaf support 06:11
281 The Model object 03:39
282 The ModelMap object 02:53
283 The ModelAndView object 03:11
284 Read URI path variables 05:50
285 Read query string parameters 04:32
286 Read Form Data with @ModelAttribute 08:12
287 Read JSON request body 04:10
288 Return JSON in response body 04:57
289 Bonus lecture 03:05

Similar courses to RESTful Web Services, Java, Spring Boot, Spring MVC and JPA

Build Your REST API with Spring 5

Build Your REST API with Spring 5

Duration 12 hours 41 minutes 39 seconds
Spring Framework 5: Beginner to Guru

Spring Framework 5: Beginner to Guru

Duration 56 hours 53 minutes 21 seconds
Java Master Class

Java Master Class

Duration 24 hours 40 minutes 37 seconds
Java Programming Masterclass covering Java 11 & Java 17

Java Programming Masterclass covering Java 11 & Java 17

Duration 80 hours 13 minutes 14 seconds
Spring Boot Microservices and Spring Cloud

Spring Boot Microservices and Spring Cloud

Duration 18 hours 8 minutes 21 seconds
Learn Spring 5 and Spring Boot 2

Learn Spring 5 and Spring Boot 2

Duration 4 hours 57 minutes 32 seconds
Learn Spring Security: The Master Class

Learn Spring Security: The Master Class

Duration 9 hours 22 minutes 39 seconds
The Ultimate Spring Integration Developer Course

The Ultimate Spring Integration Developer Course

Duration 7 hours 31 minutes 1 second
Master Spring Boot 3 & Spring Framework 6 with Java

Master Spring Boot 3 & Spring Framework 6 with Java

Duration 37 hours 34 minutes 14 seconds
Master Spring 6 Spring Boot 3 REST JPA Hibernate

Master Spring 6 Spring Boot 3 REST JPA Hibernate

Duration 36 hours 15 minutes 18 seconds