
Build a complete full-stack rest api with Java, Spring Boot, Spring Security, Spring Data, Angular, TypeScript, and Bootstrap, including a Gmail-based email sender for the contact form.
Explore the principles of REST architecture, including HTTP methods, status codes, and the client-server model, and understand constraints like statelessness, caching, uniform interface, and layering.
Download and install Maven, extract the archive, and place it under a tools folder. Set environment variables and verify the installation with mvn -version to ensure Maven communicates with Java.
Install Postman to enable invoking the rest api, select the 64-bit Windows option, run the executable, complete installation and configuration, and prepare the Postman app for use.
Create a Spring Boot project with Spring Initializr, choose maven and Java 8 jar packaging, then import the Maven project and annotate the main class with Spring Boot application.
Add the spring-boot-starter-web dependency to enable a web server in your Spring Boot app, start the application, and verify by visiting the embedded Tomcat on localhost.
Create the initial project package structure with com.controller, com.service, and com.model, and implement a User model with first name, last name, age, and country plus constructors, getters, setters, and toString.
Implement a find all users API by creating a user service interface and implementation, wiring it into a controller, and exposing /api/users that returns a list of users.
Create a static list of users in the service, populate it with generated first and last names using a name generator, and expose it via a find all method.
Use Postman to invoke the find all users API on localhost, handling with and without trailing slash, and organize requests by creating a spring boot harvest API collection.
Implement a find user by id API that returns an optional user to avoid not found errors, updating the service to use long ids and map the result in controller.
Explore using response entity in Spring Boot controllers to control http status codes and bodies, and implement find all and find by id with a user service.
implement update user api in spring boot: update optional user fields (first name, last name, age, country) in the user list via put /api/users/update, returning optional user or not found.
Learn to set up Spring Data JPA with an in-memory H2 database by adding the dependencies, configuring properties, enabling the H2 console, and running the app.
Adapt the final user API to Spring Data JPA by autowiring the user repository and using its findAll method to retrieve users from the database instead of a static list.
Modify add user API to remove the id parameter, use the user repository save method, restart the server, test with Postman, and verify the new user in in-memory H2 database.
Improve the delete user api by using the user repository to find by id and delete via spring data. Remove the user list state and verify with post man.
Update the user API to find the user by id via the repository, apply changes from Alex to Alexander, and save the updated user with Spring Data JPA.
Create ten users and save them with a bulk operation in the in-memory database. Add the springboard starter security dependency to the pom.xml to enable authentication with basic auth.
Implement customizable basic security in Spring Boot by building a custom security config from scratch, using in-memory authentication with an admin role and API access controls.
Implement a password encoder in Spring by creating a password config that returns a BCrypt encoder, inject it into security, encode the admin password, and fix the user list API.
Encode passwords for users created on application startup by using the password encoder in the load users in db component, then verify via API and H2.
Encode passwords for users created via the add and update user APIs by using a password encoder in the user service, storing encoded credentials in the database and validating changes.
Implements a custom search using criteria like user name, first name, last name, age, and country via repository APIs and a new get mapping; includes Postman tests.
Migrate from the H2 in memory database to the my school database, installing my school workbench and updating application properties, driver, and dialect to use the my school database.
Migrate the spring boot rest api to a docker environment by creating a network, launching a My School database container and a users container from dockerfile, and validating via logs.
Install Angular CLI globally with npm, verify the npm and Angular CLI versions, and confirm the installation from the command line to set up the local Angular development environment.
Download the Visual Studio Code IDE from code.visualstudio.com, install the 64-bit system, create a desktop icon, and launch the app for the Angra project.
Create and configure a new angular project named Demo UI. Install packages, set up routing with an outlet, and scaffold a user component and user service for backend integration.
Implement a full authentication flow in an Angular app to connect to a Spring Boot backend, using an authentication service, HttpClient, local storage, and a request interceptor.
Demonstrates wiring an Angular UI to a Spring Boot backend by building a find all users API, creating a user service, and rendering users in a Bootstrap table.
Implement the add user workflow by wiring the Angular component to the user service, posting a user (first name, last name, username, age, country) to the server with validation.
implement a filter in place mechanism to filter the user table, update results in the user interface (ui), and provide a reset option to display all data.
Implement a find by criteria feature that passes a criteria and a search item to the user service, validates inputs, and displays matching users in a modal dialog.
Implement delete user workflow in the ui by wiring a delete user modal to the user service, sending the delete request, and updating the user table.
Implement the update user API in the frontend using the user service to send a populated user object via http put, then update the UI and MySQL database on success.
Build a full contact form with Angular and Bootstrap on the front end and a Spring Boot back end to send emails via Gmail, with validation.
Set up the basic Angular project by creating a front folder with routing, configuring npm start to auto-open, and replacing the default welcome page to confirm the app works.
Generate the contact component for the angular app and place it in the components folder. Wire routing to map the contact path and redirect any unknown route to contact.
Build a modal contact form in Angular by creating the HTML structure for name, email, subject, and message, then wire validation and a submit button.
Initialize a Spring Boot server project, add embedded Tomcat, and include Spring Boot Starter Web and Mail dependencies to support handling contact form requests.
Build an email sending infrastructure in Spring Boot using Gmail, mapping the contact form to a DTO and implementing a mail service with mime message preparation.
Connect the front end to the back end by implementing an angular email service that posts a contact form via httpclient to a spring boot api, handling responses and errors.
Implement small updates to the contact form: reset fields on successful send, auto-clear the top info message after 3 seconds, and ensure the contact dialog remains accessible.
Discover the Java collections framework, learn how a collection groups objects into elements, and explore interfaces like set and map with their concrete implementations for storing, sorting, and ensuring uniqueness.
Explore the Java list interface with arrays and ArrayList, covering add, size, remove, set, contains, indexOf, and iteration; and the role of equals in a Person class and linked lists.
Explore the set interface as an unordered collection of unique elements, using hashCode and equals, and learn about HashSet, LinkedHashSet, and TreeSet and their insertion order, sorting, and performance.
Explore set implementations with car objects: hash set enforces uniqueness via hash code and equals, linked hash set preserves order, and tree set sorts pets using comparable and age-based comparator.
Explore the map interface and its implementations, including hash map, linked hash map, and tree map, noting unique keys, no ordering, and contains key checks using hash code and equals.
Demonstrate Java maps with a HashMap of integer keys to employee values, including iteration, contains checks, and fixing equals; show LinkedHashMap order and a reverse TreeMap.
Celebrate reaching the final of this course and thank learners for attending, while hoping they learned something valuable.
Hello there,
As part of this course you will build 2 big complete systems as from scratch (entire flow presented) - as a step-by-step guide
============================
System 1: Full Stack (back-end to front-end) REST based app - Spring Boot, Angular
Course structure:
Section 1:
short introduction about me
detailed explanation of the prerequisites for this course (Java JDK 1.8, Maven, Spring Tool Suite, Postman)
Section 2:
create the initial project structure for a Spring Boot RESTful Java Application
will learn how to include dependencies under our Maven based project
understand the correct way to structure an application based on its components
create a REST API to handle 5 main operations (CREATE, READ, UPDATE, SEARCH, DELETE) by working with User as the conceptual resource
work with Postman in order to create collection and invoke REST APIs
Section 3:
offers an introduction to Spring Data JPA and H2 In Memory Database support
will learn how to migrate a simple User model class to an Entity concept that will be handled by H2 Database
understand the step-by-step process to migrate all operations for the the User RESTful resource to Spring Data JPA storage
learn the correct way to refactor code in stages
Section 4:
introduces Spring Security basic concepts
add a custom Spring Security implementation to handle basic authentication and access to resources
learn how to encode passwords in Spring Boot
introduce Spring Data JPA pagination support for Find All Users API
implement a mechanism to provide an alternative search for Find User based on specific criteria
Migrate from H2 In Memory Database to MySQL Database
Move application to run under Docker environment
Section 5:
create an Angular 10 based application as the front-end section for our course
transform the course to a Full Stack application
implement Authorization Mechanism
include Login and Users components
add support of working with Angular Guards
include different UI components as part of integrating MDBootstrap UI framework
create Angular services and main infrastructure of communicating with the Spring Boot back-end application
============================
System 2: Build a fully functional contact form (back-end to front-end) + GMAIL integration
Course structure:
Even if you are new to this topic, or have some experience in the vast Web Development world, I will guide you on this step by step process of building this system.
So...what will we build?
We will create a complete and responsive contact form that will be capable of sending emails by using the GMAIL service integration support
What technologies/frameworks will we use for Front-end integration?
We will use Angular 10, Typescript and MDBootstrap Framework
What technologies/frameworks will we use for the Back-end integration?
Will work with Spring Boot, Spring Boot Mail Integration, and configure a testing GMAIL account that we can use for testing
What is the outcome of following this class you might ask?
You will understand the basic principles of working on a Full Stack Web Application (understand how the communication is made between a front-end app to a back-end server) - by following a real working example -> Building a contact form for a website
============================
Bonus:
Added a new section related to Java Collections Framework - Fast Interview Preparation
============================
Enjoy