Description
In this course, you will :
- Be able to use Spring Framework to create a RESTful Web Service.
- You must be able to send HTTP requests and receive HTTP responses in JSON or XML format using the Postman HTTP client.
- Create Web Service endpoints to handle HTTP POST, GET, PUT, and DELETE requests.
- Validate and read URL Query String Request Parameters.
- HTTP Request Body should be read and validated.
- Handle Java Exceptions and return a valid HTTP Response.
- Create and run a stand-alone RESTful Web Service Application.
Syllabus :
1. Setting up Develeopment Environment
- Install Java Platform(JDK)
- Download and Install Spring Tool Suite(STS)
2. Creating a New Project
- Create new Spring Boot Project with Spring Tool Suite
- Creating a new Spring project using Spring Boot Initializr
3. Create RESTful Web Service Endpoints
- Create Users Rest Controller class
- Adding Methods to Handle POST, GET, PUT, DELETE HTTP requests
- Running Web Service Application
4. Handle HTTP GET Request
- Reading Path Variables with @PathVariable annotaion
- Reading Query String Request Parameters
- Making Parameters Optional or Required
5. Returning a Response
- Returning Java Object as Return Value
- Returning Object as JSON or XML Representation
- Set Response Status Code
6. Handle HTTP POST Request
- Reading HTTP POST Request Body. The @RequestBody annotation.
- Validating HTTP POST Request Body
7. Handle HTTP PUT and HTTP Delete Requests
- Store Users Temporary
- Handle HTTP PUT Request
- Handle HTTP Delete Request
8. Exceptions Handling
- Handle an Exception
- Return Custom Error Message Object
- Handle a Specific Exception
- Throw and Handle You Own Custom Exception
- Catch More Than One Exception with One Method
9. Dependency Injection
- Create and Autowire a Service Layer Class
- Constructor Based Dependency Injection
10. Standalong Application
-
Run Web Service as a Standalone Application