
Explore a quick start to building restful web services with Spring Framework through short, step-by-step lessons, emphasizing incremental code examples and guided next steps.
Learn how to download, install, and launch the Postman HTTP client to create and test RESTful API requests, inspect responses, and test web services across Mac, Windows, Linux, and Chrome.
Learn Postman basics for RESTful APIs: navigate history and collections, create and save http requests, explore query strings vs body, generate code snippets, and use the console with syncing.
Learn how restful URIs structure access to resources by using nouns and path parameters, leveraging http methods for actions, and keeping collections like users simple and readable.
Map http methods to create, read, update, and delete operations in a rest-style web service using post, get, put, and delete with json payloads and uris like /users.
Use content-type and accept headers to send json in the request body and receive json or xml, with automatic conversion to Java objects when supported.
Download and install the Java development kit for macOS, verify the installed version, locate the Java home folder, and set the JAVA_HOME environment variable for restful web services development.
Learn to download and install Spring Tool Suite, an eclipse-based, cross-platform environment for developing, debugging, running, and deploying Spring and Spring Boot web services.
Create a new Spring Boot project in Spring Tool Suite, configure the workspace, select web dependency, and learn how pom.xml enables restful web services with Spring MVC and Tomcat.
Create a Spring Boot project quickly with Spring Initializr, selecting Maven and web to support restful web services, then open the generated project in your preferred IDE.
Create a rest controller for user operations in a Spring Boot app, using a RestController and request mapping to handle create, update, and delete user requests at /users.
Define and bind rest endpoints for user operations using spring annotations, implementing get, post, put, and delete mappings to create, read, update, and delete user details with json payloads.
Run a Spring Boot web service locally, deploy on Tomcat port 8080, and test users CRUD endpoints with http get, post, put, and delete using Postman.
Read a user id from the url path by binding a path variable in a spring rest controller, using @PathVariable and testing requests with postman.
Learn to read query string parameters in Spring rest endpoints, implement pagination with page and limit, and use request param annotations to handle required and optional values.
Learn how to make one or both of your GetUsers request parameters optional by assigning default values, such as page=1 and limit=50. Explore using required=false for optional parameters, handle potential null values and null pointer exceptions, and prefer defaults with strings like sort to avoid type issues.
Return a user details object, not a string, containing first name, last name, email, and user id as the API response, with json or xml representation.
Learn how a Spring rest endpoint returns data as xml or json by configuring produces and accept headers, and enable xml support with jackson data format xml for flexible responses.
Learn how to return specific HTTP status codes from a Spring REST endpoint using ResponseEntity, including 200, 400, 401, and 500, with optional body and headers.
Learn to handle http post requests, read Json or Xml payloads from the request body, and map them to a java object using @RequestBody annotation in spring web service.
Enable bean validation in Spring Boot to validate a user details request body with hibernate validator, applying not null, size, and email constraints to produce 400 errors with messages.
Store users temporarily by using an in-memory Java map to support POST, GET, and DELETE mappings in a Spring REST service, with UUID-generated IDs.
Shows how to handle http put requests to update user details via a put mapping, using path variables, a request body, and an update user details model.
Demonstrate handling http delete requests with add delete mapping, read the user id via a path variable, delete the record, and return a 204 no content response.
Learn to centralize exception handling in Spring REST services with a controller advice class and exception handler methods that return structured JSON or XML error responses.
Learn to return a custom Json error object in a Spring REST app by creating an error message model with timestamp and message, and wiring it into the exception handler.
Replace a general exception handler with a null pointer exception handler in Spring using controller advice, and demonstrate handling a custom user service exception via Postman and debugging.
Create a custom runtime exception with a message, throw it from the controller, and handle it in a dedicated exception handler to return a response with a custom description.
Combine multiple exceptions in a single controller advice method by listing exception classes in the exception handler annotation, unifying null pointer and user service exceptions.
Learn to apply dependency injection by creating a user service interface and its implementation, then autowire the service into the controller to enable isolated testing with JUnit and Mockito mocks.
Learn to implement constructor based dependency injection in Spring by injecting a utility class into a user service, leveraging constructor injection and service annotations for auto wired components.
This video course is a Quick Start to learning How to Build RESTful Web Services with Spring Framework.
As you go through this video course you will learn how to use tools like:
Spring Tool Suite Development Environment,
Postman HTTP client, so that you can send HTTP Requests and Receive HTTP Responses,
You will also learn how to Download and Install Java if you do not have it already.
Although this video course is very short, and is very simple, it is also very practical!
You will write Java code that handles different types of HTTP Requests. You will learn how to create web service endpoints that accept HTTP Post, HTTP GET, HTTP PUT and HTTP Delete requests.
You will learn how to make your RESTful Web Service endpoints accept information via URL Query String parameters, via URL Path Parameters as well as information sent via the body of HTTP Request,
Additionally to learning how to read request parameters from HTTP request, you will learn how to make your RESTful Web Service, return information in different formats. For example, you will learn how to return information as a plain text or as a JSON or XML document.
You will learn how to validate HTTP request parameters and also how to validate a information sent via HTTP Request body. Make sure that certain required fields are not empty and that email address for example is of a correct format.
You will learn how to handle errors in your RESTful Web Service and also learn how to return information about the error in different custom formats.
And finally, additionally to building and running your RESTful Web Service with a Spring Tool Suite development environment, you will learn how to run your RESTful Web Service as a standalone Java application which runs independently of your development environment.