
Install Postman and learn to test restful endpoints by creating http requests and inspecting responses. This free cross-platform tool streamlines working with restful web services across Mac, Windows, Linux.
Master a basic Postman overview for RESTful API design, using history and collections to organize requests, inspect responses, and leverage code snippets and the console.
Explore how to design RESTful resource and collection URIs using nouns and plurals, with path parameters and HTTP methods for get, post, put, and delete actions.
Explore how http methods like get, post, put, and delete enable create, read, update, and delete operations in restful web services, with json payloads in the http body.
Use http content-type and accept headers to send json in the request body and request a specific response format, such as json or xml, during user profile creation.
Explore the three-layer architecture of restful web services—presentation, service, and data layers—where requests are handled, business logic runs, and database access is abstracted.
Follow the video order and download the source code to avoid missing configuration or annotations. When errors occur, read the message, and use breakpoints to compare with the provided code.
Learn to download the MySQL community server for Mac, run the installer, and set a secure admin password to log in and start the MySQL server.
Start and manage a MySQL 8.0.11 server on macOS using the terminal, with commands to start, stop, restart, log in as root, and troubleshoot common issues.
Create a new MySQL database and a dedicated user, grant privileges, and leverage Hibernate and Spring Data JPA to auto-create tables from Java entity objects.
Learn how to download, install, and start MySQL Workbench, a graphical tool to manage MySQL databases, create tables, and run SQL queries efficiently.
Create a new MySQL Workbench connection named Photo App, test the connection with user Sergei and saved credentials. Update the user password encryption and restart the server to sign in.
Explore a brief overview of mysql workbench as a flexible gui tool for connecting to mysql databases, opening a workspace, and executing sql commands.
Install the Java development kit (JDK) on your Mac, verify the installation with java -version, and set the java_home environment variable to prepare for Java-based RESTful web services development.
Download and install Spring Tool Suite, an eclipse-based development environment customized for Spring applications, to develop, debug, run, and deploy restful web services with Spring and Spring Boot.
Create a new Spring Boot project in Spring Tool Suite, selecting workspace, configuring group and artifact, and adding the web dependency via Maven. Understand the pom.xml and project structure.
Create a new Spring Boot project quickly with Spring Initializr, selecting Maven, Java, and the Web dependency to enable RESTful web services, then import into your preferred IDE.
Create rest controller in a spring boot app to handle user operations via /users endpoints. Define methods with Rest controller and Request mapping to receive HTTP requests and send responses.
Define a basic restful web service with get, post, put, and delete mappings to manage user data, returning strings initially and planning json payloads for a mobile app.
Learn to run a Spring Boot web service, with embedded Tomcat, and test crud operations on /users using Postman, guided by Spring annotations.
Build a restful web service with a MySQL database using Spring Data JPA and the MySQL Connector, wired through pom.xml and Maven dependencies.
Configure spring data jpa by editing application.properties with the MySQL username and password, data source url (localhost:3306) and the database name Photo app, and set hibernate ddl auto to update.
Handle http post requests by reading the Json body with a request body annotation, letting the framework convert Json to a Java object, and persist the data.
Create a user details request model with fields first name, last name, email, and password, exposing getters and setters to map incoming JSON to a Java object.
Create a new java class as a response model in a dedicated package to return a json payload with public user ID, first name, last name, and email.
Create a shared user DTO for UI, database, and service layers; implement serializable with serialVersionUID and include fields like id, userId, firstName, lastName, email, password, and email verification status.
Map the request body to a user dto with BeanUtils, invoke the user service to create the user, and return a user rest containing the new id.
Create a user service interface and its implementation to handle creating a user via a user DTO. Wire the service into the controller and organize classes into a service package.
Create a serializable user entity class in data layer to persist user details to a MySQL table, with fields like id, userId, firstName, lastName, email, and emailVerificationStatus using JPA annotations.
Set a reliable default for email verification status by explicitly assigning false in the entity and the user DTO, avoiding non-portable column definitions across databases.
Create a user repository interface that extends CrudRepository for basic CRUD on the user entity. Annotate with Repository and optionally add a method to find by email address.
wire the user repository into the service, copy properties from a user dto to a user entity using BeanUtils, and save to the database, returning a user dto.
Post a json body to the users endpoint to create a new user; the payload maps to a user details model and saves to MySQL, returning a 200 status.
Enforce a unique constraint on the email field with @Column(unique=true) to prevent duplicate user records, and test with postman while preparing user-friendly error handling for Spring boot restful services.
Check for existing users by email, using a find by email method; if found, throw a runtime exception 'record already exists' and let Spring Boot format JSON or XML.
Generate a secure, random 30-character alphanumeric public user ID to identify records in the database and return it in JSON or XML responses to calling clients.
Add spring security to a spring boot project by including the spring boot security starter in pom.xml, enabling secured endpoints and login via generated password, and JSON web token support.
Implement a bcrypt password encoder bean from the Spring framework security crypto package, wire it into the user service, and encrypt the user password before storing it in the database.
Configure spring security to make the sign-up endpoint public while protecting all other endpoints, using a custom user service and bcrypt encoding with a web security config.
Migrate from the deprecated web security configure adapter by configuring http security with a bean, disable csrf for a stateless rest api, and permit http post /users.
Create a Java login request model to map sign-in json with email and password, generate getters and setters, and prepare authentication in the api.
Implement loadUserByUsername to fetch user details from the database, throw username not found when absent, and return a Spring Security user with an encrypted password and empty authorities.
Create a security constants class to hold JWT values like expiration time, token prefix, authorization header, signup path, and token secret, ready for use by the authentication filter.
Add Maven dependencies to the pom.xml, including JWT API, JWT implementation, and Jackson, to enable generating a JWT access token in the next lesson.
Build and wire an authentication filter for login requests by extending the username password authentication filter, reading username and password from a JSON payload, and delegating to the authentication manager.
Implement the successfulAuthentication method to generate a JWT access token using the authenticated user's username, sign it with a secret key, and return it in the HTTP response header.
Register the authentication filter with the HttpSecurity configuration, build a custom authentication manager, wire it into the security chain, and run the app to verify.
Explore how a Spring Boot application authenticates users and returns a jwt access token via the default /login endpoint, wiring the authentication filter, load user by username, and successful authentication.
Add user id to the http response header after login, enabling use of the authorization JWT access token and public user id in subsequent requests within a spring boot app.
Customize the login path by configuring a custom authentication filter in spring security, replacing the default /login with a new path such as /users/login and verifying a 200 response.
Implement a custom authorization filter that reads the json web token from the authorization header, validates it, and populates the security context for protected endpoints in a stateless setup.
Run a spring boot app and test user authorization with a JWT token, showing that post /users is public while protected endpoints require a valid authorization header.
Read the token secret from application properties using Spring's environment, replacing hardcoded values. Define the token secret in application.properties and access it via a getTokenSecret method in the authorization filter.
Read the user id from the url path parameter and return a user details object with id, first name, last name, and email.
Implement a service layer method to get a user by user ID, returning a user data transfer object from the repository. Handle null results and copy properties to the DTO.
Add a find by user id method to the user repository, using Spring Data JPA to auto-generate the SQL query and return a user entity.
Run and debug get user details by user ID flow, verify path variable, and fetch user via repository; then authenticate with JWT to call protected API.
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 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 a 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 the 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.
In 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-alone Java application with build-in Tomcat,
Deploy your RESTful Web Service to Apache Tomcat as well as,
Startup 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 deploy your application to AWS Beanstalk
This video course also covers the H2 in-memory database and teaches how to build a 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 the 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.
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.