RESTful Web Service with Java JAX-RS. Create & Deploy to AWS
4.3 (438 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,683 students enrolled

RESTful Web Service with Java JAX-RS. Create & Deploy to AWS

* Create REST API with JAX-RS and Jersey * Build Restful Web Service * Deploy to AWS * Implement CRUD with Hibernate *
4.3 (438 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,683 students enrolled
Created by Sergey Kargopolov
Last updated 11/2018
English
English [Auto]
Current price: $104.99 Original price: $149.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 9.5 hours on-demand video
  • 5 articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Install Java, Netbeans IDE, Postman, MySQL Service and Apache Tomcat on local Mac computer
  • Learn to send HTTP Requests with Postman client
  • Use Netbeans to write Java code
  • Create Java Project with Maven
  • Configure Hibernate framework to persist Java objects in MySQL database
  • Build RESTful Java Web Services with JAX-RS and Jersey framework
  • Startup AWS EC2 Linux Server in Amazon Cloud
  • Configure AWS EC2 Instance Firewall
  • Connect to AWS EC2 Instance via SSH
  • Create MySQL database and users
  • Install MySQL Server and Apache Tomcat on AWS EC2 Linux Server
  • Deploy RESTful Java Web Service to a remote AWS EC2 Linux Server
  • Implement Email Verification with AWS SES(Simple Email Service)
Course content
Expand all 100 lectures 09:19:19
+ Source code
1 lecture 00:04

This section contains a link to download entire source code of my project.

Source code
00:04
+ Introduction
6 lectures 35:29

Introduction to a course

Preview 03:31

In this video we will download and install Postman client which we will use in this course to send HTTP Requests to our RESTful WebService.

Preview 02:09

This video will cover Postman HTTP client user interface and show you how to use it to send HTTP Requests. 

Postman overview
10:41

When building RESTful WebServices it is very important to understand what is a Resource and what is a Resource collection as well as how to structure a URL to a Resource and to a Resource collection. In this video we will learn how the URL to a Resource should be structured and look like. 

Resource and Collection URIs
11:12

In this video we will learn about most commonly used HTTP Methods and how they are being used in RESTful Web Services. 

HTTP Methods. GET, POST, DELETE, PUT
03:44

In this video we will learn about Accept and Content type HTTP headers and how they used with RESTful Web Services. 

Preview 04:12
+ Development Environment: Netbeans
5 lectures 28:00

In this video we will download and Install Java Development Kit on our computer.

Install Java Platform (JDK)
04:31

In this video I will give you an overview of Netbeans Development Environment which we will then download and install on our computer.

Download and Install NetBeans Development Environment
05:15

In this lesson I will introduce you to a Software Management Tool called Maven. We will then learn how to create a new Java project using Maven.

Create new Project with Maven
06:10

In this video we are going to learn how to add dependency libraries to our project. We will use Maven to download and add to our project following libraries: Jersey framework, MySQL database server and Hibernate framework. 

Adding Jersey Framework, MySQL and Hibernate Dependencies
06:31

In this lesson we will learn how to download and install on our local computer Apache Tomcat Servlet Container. We will also learn how to add Apache Tomcat to our Netbeans project. 

Download & Add Apache Tomcat to our Project
05:33
+ What if You Use IntelliJ?
4 lectures 15:06
Only if you use IntelliJ IDE
00:10
Create Maven project with IntelliJ
04:32
Add needed dependencies to pom.xml file
06:31
Add Tomcat to IntelliJ
03:53
+ What if You Use Eclipse
5 lectures 19:33
Only if you use Eclipse IDE
00:10
Download Eclipse
02:05
Create New Maven Project with Eclipse
05:30
Add needed dependencies to pom.xml file
06:31
Add Tomcat to Eclipse Project
05:17
+ MySQL Database on Local Computer
2 lectures 12:55

In this lesson we will download and install MySQL database server. 

Downloading and Installing MySQL Database
07:46

In this video we will learn how to create a new database and a new database user. 

Creating MySQL Database and User
05:09
+ Hibernate
1 lecture 08:27

In this video we will talk about the Hibernate configuration file learn how to configure it so that we can use Hibernate framework to persist Java objects into MySQL database. 

Create Hibernate Configuration File
08:27
+ Getting Started
2 lectures 09:11

In this lesson I will give you an overview of how I have organized my code in this project. There are three main layers I am going to introduce you to: Presentation layer, Service layer and Data layer and you will learn what objects live in each of these layers. 

Introduction to Web Service Application Layers
05:47

In this lesson we will create our Web Service application starting point. 

Create Application Starting Point
03:24
+ HTTP POST. Creating New User Profile
4 lectures 44:32

In this video we are going to create a Web Service Resource Class which will be responsible for accepting HTTP Requests and responding to those HTTP Requests and this Resource class service HTTP requests that are only related to working with User and their Profile. For example to create a new user in our application we will send an HTTP Post request, and it is this Resource class, that will be responsible for handling that HTTP request and responding to it. Or if our mobile application needs to update or delete user profile, it is also this Resource class that will be service these http requests. 

This resource class will need to be annotated with @Path annotation which will be used to specify the URI path to this resource class. For example by annotating this resource class with @Path("/users") we are making it available for http requests which are sent to a /api/users web service endpoint. 

Users Resource Class & Create User Method
13:39

In this video we are going to create two Plain Old Java Objects which will be used when the framework needs to convert the JSON Payload into Java object when HTTP Request arrives and then back from Java to JSON or XML when we need to send the HTTP Response back. 

And this conversion of JSON to Java and from Java back to JSON is done by the Jersey framework for us and we do not need to do anything manually other than create a Java class that will match the fields in the JSON object. 

Also, I am going to use the Java Architecture for XML Binding (JAXB) approach and will annotate my Java Model classes with @XmlRootElement. The use JAXB will allow me to support both XML and JSON as a MediaType of the Resource Representation my Web Service sends back to a mobile application. 

New User Request & Response Model
09:45

In this video we are going to create a UserService interface and interface implementation code. 

User Service Method
16:51

In this video we will write code to check if all the required fields are present and their values are not empty. 

Validate the required fields
04:17
+ Exceptions Handling
7 lectures 28:16

In this video we will start talking about how to handle errors in our Web Services project and will create a first class that will hold the description of error messages that we will handle and return back with a HTTP Response. 

Create Error Messages Enum
04:31

In this video we are going to create our first custom exception class which is a Missing Required Field Exception. 

Create Custom RuntimeException
02:33

In this video I am going to show you how to enable Netbeans hits and how to install a Netbeans plugin that generates a unique value for serialVersionUID

Installing Netbeans Plugin to generate the unique value for serialVersionUID
03:53

In this lesson we will create an ErrorMessage class which will eventually we converted into JSON or XML format and returned back with HTTP Response of an error took place. 

Create ErrorMessage Class
04:23

In this lesson we will learn how to create Exception Mapper class and how to make it return the error message we want. 

Return Exception Message As JSON
05:59

In this video we will run our project and will send an HTTP request which should trigger and error message. We will see how an error message is triggered and returned back with HTTP response. 

Sending HTTP Request to see the error message
02:58

In those cases when an error took place and we do not have a handler for that Exception message, we will use a Generic Exception Mapper class to handle all other error messages. This way we will always return back a properly formatted error message in JSON format. 

Creating Generic Exception Handler
03:59
Requirements
  • You should have beginner knowledge of Java language
Description

This is a very practical video course aimed at beginner Java developers to help them build their very first RESTful Java Web Service with JAX-RS and Jersey framework as well as implement features like: 

  • User sign up, 
  • User sign in, 
  • Token base authentication.
    Students will also learn how to encrypt user provided password, generate a public user id which is safe to pass around the network in HTTP Requests, and how to generate and securely store as well as validate a secure access token, 
  • Protect RESTful WebService endpoints, 
  • Update database records by implementing Update User Profile details feature, 
  • and learn how to Delete database records,
  • Implement Email Verification feature using Amazon AWS SES(Simple Email Service)

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

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

This video course also teaches how to install needed software on local computer to be able to build RESTful Java Web Service as well as:

  • How to start up your own Linux server in Amazon cloud( AWS EC2),
  • Install needed software on a remote EC2 instance and finally, 
  • How deploy created WebService on AWS EC2 instance. 

Please note that even though this video course covers all of the above mentioned, it is not a comprehensive guide that covers, in little details, all and everything about building Web Services. There are still things to be learned. But you will definitely benefit and gain by learning the above mentioned material. 

Who this course is for:
  • Beginner in Java programming
  • Beginner in building RESTful Web Services