
Explore how to build a CRUD app from scratch using Spring Boot, JPA, PostgreSQL, and Thymeleaf, covering project setup, models, database setup, services, controllers, and templates for user management.
Explore building a CRUD app with Spring Boot, JPA, PostgreSQL, and Thymeleaf by creating, viewing, editing, and deleting employee records in a live demo.
Install Java by downloading from official sites, choose a compatible version for Spring Boot, install on Windows, set path and Java home, verify with java -version.
Install Java first to ensure compatibility before installing the IntelliJ IDE. Choose the community edition for beginners, download and install, and prepare for Postgres setup in the next video.
Install PostgreSQL by downloading the official Windows installer, set a default username and password, and use pgAdmin to manage the database for your Spring Boot and JPA project.
Generate a spring boot project with spring initializer, select maven or gradle, add dependencies like spring web, thymeleaf, devtools, and a database driver, then import into IntelliJ and resolve dependencies.
Create an employee entity mapped to employees table with id, first name, last name, email, dob, and gender; include constructors and getters/setters, and use Hibernate to auto generate the id.
Create a new database named Spring Boot in pgAdmin, connect to a Postgres 14 instance, access the public schema, and prepare to generate tables using Hibernate entity classes.
Configure a data source in Spring Boot, connect to the database on localhost:5050, and use Hibernate ddl auto create to generate the employees table from the entity.
Create a dao repository for the employee entity by extending JpaRepository with an integer id, outlining basic findAll, save, delete, and get methods; next, cover the service layer.
Implement a Spring service layer for employee management by creating an employee service, exposing get all, get by id, update, and delete operations via a JPA repository with null-safe checks.
Create a Spring Boot employee controller with view, add, save, edit, and delete mappings, using model attributes, redirects, and Thymeleaf views for a PostgreSQL backed JPA app.
Develop the add employee template with thymeleaf and bootstrap, featuring a responsive form for first name, last name, email, dob, and gender, connected to a post mapping.
Create a view employee template that lists employees in a Bootstrap table, displaying id, first name, last name, email, and gender, with add and delete actions wired to endpoints.
Create an edit employee template that uses a hidden id field to securely pass the selected employee’s ID to the backend, enabling edits and two-way data binding for form fields.
Implement delete employee functionality in a Spring Boot + JPA + Thymeleaf CRUD app, fix service logic to verify deletion by checking id, refresh view, and plan user notifications.
Add toast notifications to spring boot + jpa + postgresql + thymeleaf CRUD app, showing success and failure messages on add, edit, and view pages with configurable position and duration.
Spring Boot is a really hot topic these days and there are a lot of job openings in this field too and so does the competition. You will see a lot of courses on Udemy where everyone has nicely explained what Spring Boot is and how it helps a developer which maybe can help you crack the technical interview while job hunting.
But, after you get into the organization, you have to be ready to code which you will only gain after doing a lot of practicals on Spring Boot, So, here I am with one of the best real-time applications to get make you ready enough to have some exposure to the real technical world.
In this course, we are going to create a CRUD application from scratch using Spring Boot, JPA, Hibernate, Thymeleaf, and PostgreSQL.
CRUD application means to CREATE, READ, UPDATE, and DELETE.
Here, I've taken a reference for the WORKFORCE MANAGEMENT application which is basically used to manage resources. This application is always used in organizations to manage employees. Some features of this application:
Add a new employee to the application
New/Existing users can add/edit personal information or skillset information by adding new skills to it.
Depending on the skill set of an employee, allocate an employee to a project or allocate some percentage of the employee's work to a project
Remove an employee from the application
... and so on...
So, I've taken an example of the above application which I also made from scratch in one of the previous organizations. Hence, in this course, I'm trying to showcase a mini version of the above-explained application which is to:
CREATE EMPLOYEES
DELETE EMPLOYEES
UPDATE EMPLOYEES
VIEW EMPLOYEES
This course will really help you to gain exposure to what real-time applications look like.