
Explore spring boot prerequisites and project setup, including dependencies, data setup with an in-memory database, and building a real-time rest application with exception handling, content filtering, and rest template calls.
Build a real-time Spring Boot rest application for an employee management system with CRUD operations, multi-environment profiles, and Swagger testing for seamless database integration and scheduled emails.
Set up the initial spring boot project using spring initialize in IntelliJ, create a Maven project with java 8, and add dependencies: Spring Web, DevTools, Lombok, JPA, H2, and Mail.
Set up the base Spring Boot project, switch to log4j, build with Maven, and run on port 8080 while enabling debug logs to inspect startup beans and database setup.
Learn to configure the H2 in-memory database for a Spring Boot app, enable the H2 console, show SQL formatting, and verify the connection and auto-created tables from entities.
Define a JPA entity department with id and department name, annotated as an entity with generated values and columns, and use Lombok to reduce boilerplate.
Document the project with a readme and outline employee tables: personal details, payroll, passport, and address, using base department and designation tables with 1:1 and 1:N entity mappings.
Create and map employee related entities, including personal details with a 1-to-1 relation, plus payroll, password, and a many-to-one designation. Preload data with data.sql and enable Hibernate to create tables.
Enable spring boot to auto-create tables and preload data using schema.sql and data.sql; configure the database in application properties and restart to verify tables and data.
Develop and test a simple rest api in a Spring Boot project by creating an employee controller and jpa repository, then verify the hello and fetch endpoints with Postman.
Create a get all employees endpoint using the employee repository to retrieve all records, and map the results to a data transfer object instead of returning the entity directly.
Add a get by id endpoint in a Spring Boot rest app, using repository.findById with an Optional to safely retrieve an employee by their id from a path variable.
Define a department repository and custom queries to fetch employees by department name, map to department IDs, and implement a get employees by department method in the employee repository.
Implement a method to get employees by department in the employee repository, using a query joining department and employee by department id, and test it to fetch marketing department staff.
Create an employee response DTO to map data from multiple tables and return consolidated details to the end user, including name, department name, designation, hire date, and address.
Refactor the code by moving repositories into a new employee service, wire the service in the controller, and use a response DTO populated from payroll details and designation.
Learn how to build a custom DTO to return an employee response, including higher manager details, designation, and department name, by fetching data via the employee service and mapping fields.
Refactor code by extracting a helper class for employee operations, implement an employee helper to generate responses for single and multiple employees, and adjust controller logic for department-based results.
Implement a custom query to fetch employees by their reporting manager in a Springboot REST app. Build a repository method, create a controller endpoint, and map results to response DTOs.
Develop a custom query to fetch passport-expired employees by comparing current date with passport details, introduce a new repository method, and expose it via the controller.
Learn to handle data access errors by introducing a custom EmployeeNotFound exception, map it to 404 not found, and return clear, user friendly error messages without exposing traces.
Define an employee exception response and a global exception handler to return structured error details via a response entity for not found errors, validated in Postman.
Master global and custom exception handling in a spring boot rest application by intercepting errors, returning clear messages with appropriate status codes, and overriding validation handlers.
Apply content filtering in a Spring Boot rest app using JsonIgnore to exclude sensitive fields from responses, and evaluate role-based data visibility for employees and managers.
Learn to implement content filtering in a Spring Boot REST API using Jackson filters and JSON ignore properties. Create an employee filter endpoint returning only selected fields.
Explore dynamic content filtering with Mapping Jackson in a Spring Boot real-time REST app, applying admin vs employee filters to response data while comparing JSON ignore and runtime filtering.
Create a dedicated employee demo controller for create and update operations, configure a base URL via application properties, and build an employee request dto with Lombok to enable save functionality.
Create a post mapping to save a new employee using the employee service and repositories, including department lookup, request body input, status enum, and preparing for personal and payroll details.
Continue building the new employee object by creating personal and payroll details, then set first name, last name, email, mobile, designation, and payroll bank data from the request.
Populate an employee from the request by filling personal, payroll, passport, and address details, then save the complete employee via the repository using a post method.
Explore creating a new employee post method in a Spring Boot real-time REST app, sending nested JSON via Postman, mapping to Java objects, and returning the saved employee.
Refactor the create employee flow in a spring boot rest app by extracting methods and moving logic to a helper, delegating to the employee service and repository for persistence.
Use a put mapping to update an employee's designation by id, fetch the employee and designation from repositories, and save updated personal details to reflect the new designation.
Create a delete mapping API to remove an employee by id, handling non-existent records and cascading deletions to related data via the employee repository.
Learn to call a third-party rest API from a spring boot app using rest template, including the Indian Postal Code API, base URL, get for object, and response entity.
Create a Java pin code API response object to map REST API JSON, including a response with message, status, and a list of post offices, using Lombok.
In this course, you will learn how to build REAL TIME REST APIs using Spring boot.
Well, we will follow the Real-time industry-standard project development approach in this course.
SpringBoot ?
Spring Boot is an open source, microservice-based Java web framework. The Spring Boot framework creates a fully production-ready environment that is completely configurable using its prebuilt code within its codebase
JPA?
Spring Boot JPA is a Java specification for managing relational data in Java applications. It allows us to access and persist data between Java object/ class and relational database. JPA follows Object-Relation Mapping (ORM). It is a set of interfaces
H2 Database ?
H2 database is an open source, embedded and in memory relational database management system. It is written in Java and provides a client/server application. It stores data in system memory instead of disk. Once program is closed, data is also lost
Lombok ?
What is Lombok. Project Lombok (from now on, Lombok) is an annotation-based Java library that allows you to reduce boilerplate code. Lombok offers various annotations aimed at replacing Java code that is well known for being boilerplate, repetitive, or tedious to write
You will learn the below topics in this course :
How to create SpringBoot project using Intellij and Spring initializer
How to add project dependencies
What is JPA and how to create Entities
Relationship between entities [tables]
How to write API's in SpringBoot
Learn Spring boot REST API exception handling for the entire application
Learn how to use Data Transfer Objects
You will learn using Lombok annotations
Learn REST APIs Documentation with Swagger UI
You will learn to perform the database operations using Data JPA
You will connect Spring Boot application to MySQL database
You will connect Spring Boot application to H2 database
You will learn to create the REST end points
Learn how to build CRUD REST API's
Learn how to content filtering using Jackson
Learn how to write Asynchronous method
Learn how to write scheduler with CRON expression
Learn how to Call third part rest API's
Learn how to refactoring the code
Learn how to send email from SpringBoot
Technologies:
Java 8+
Spring Boot
Spring Data JPA
Tomcat
IDE:
Intellij IDEA
Database:
H2 In Memory
MySQL database
Tools:
Postman - Test REST API
Maven - Build Tool