Spring Boot Tutorial

Spring Boot + JUnit 5 + Mockito: Unit Testing Service Layer

Introduction In this tutorial, we will focus on unit testing the service layer of a Spring Boot application using JUnit 5 and Mockito. Unit testing is the process of testing individual units or components of an application in isolation. This ensures that each unit behaves correctly in different scenarios. JUnit 5 is a popular testing framework …

Spring Boot + JUnit 5 + Mockito: Unit Testing Service Layer Read More »

Spring Boot CRUD Example with MongoDB: CRUD REST API Step-By-Step Guide

In this tutorial, we will build a Spring Boot CRUD (Create, Read, Update, Delete) application using MongoDB. We will manage a Todo entity with fields: id, title, description, status, and createDate. We will use Java record for the DTO and follow best practices by keeping the conversion logic in the service layer. We will develop …

Spring Boot CRUD Example with MongoDB: CRUD REST API Step-By-Step Guide Read More »

Spring Boot CRUD Example with MariaDB

In this tutorial, we will build a Spring Boot CRUD (Create, Read, Update, Delete) application using MariaDB. We will develop CRUD RESTful web services for creating, reading, updating, and deleting todos. Spring Boot Three-Layer Architecture +———–+ +—————–+ | | | Controller Layer| | Postman +—–>+ (Handles HTTP | | (Client) | | requests and | …

Spring Boot CRUD Example with MariaDB Read More »

Spring Boot CRUD Example with MS SQL Server: CRUD REST API Step-By-Step Guide

In this tutorial, we will build a Spring Boot CRUD (Create, Read, Update, Delete) application using MS SQL Server. We will build CRUD RESTful web services for creating, reading, updating, and deleting products. Spring Boot Three-Layer Architecture +———–+ +—————–+ | | | Controller Layer| | Postman +—–>+ (Handles HTTP | | (Client) | | requests …

Spring Boot CRUD Example with MS SQL Server: CRUD REST API Step-By-Step Guide Read More »

Spring Boot CRUD Example with Oracle Database: CRUD REST API Step-By-Step Guide

In this tutorial, we will build a Spring Boot CRUD (Create, Read, Update, Delete) application using the Oracle Database. Spring Boot Three-Layer Architecture +———–+ +—————–+ | | | Controller Layer| | Postman +—–>+ (Handles HTTP | | (Client) | | requests and | +———–+ | responses) | +——–+——–+ | v +——–+——–+ | Service Layer | …

Spring Boot CRUD Example with Oracle Database: CRUD REST API Step-By-Step Guide Read More »

Spring Boot CRUD Example with PostgreSQL: Step-by-Step Guide

In this tutorial, we will build a Spring Boot CRUD (Create, Read, Update, Delete) application using PostgreSQL as the database. The application will manage a Product entity with fields: id, name, description, and price. We will use Java record for the DTO (Data Transfer Object) and follow best practices such as keeping the conversion logic …

Spring Boot CRUD Example with PostgreSQL: Step-by-Step Guide Read More »

Spring Boot CRUD Example with H2 Database: Step-by-Step Guide

In this tutorial, you’ll learn how to build a Spring Boot CRUD (Create, Read, Update, Delete) application using the H2 in-memory database. We will use Java record for the DTO (Data Transfer Object) and follow best practices by keeping the conversion logic in the service layer. What You’ll Learn: Setting up a Spring Boot project …

Spring Boot CRUD Example with H2 Database: Step-by-Step Guide Read More »

Spring Boot CRUD REST API with MySQL and Java Record DTO: Step-by-Step Guide

In this tutorial, we will create a Spring Boot CRUD (Create, Read, Update, Delete) application using MySQL as the database. We will use Java record for the DTO (Data Transfer Object) to transfer data between the client and server. What You’ll Learn: Setting up a Spring Boot project. Configuring MySQL for persistence. Implementing CRUD operations …

Spring Boot CRUD REST API with MySQL and Java Record DTO: Step-by-Step Guide Read More »

Building Web Application using Spring Boot

Introduction In this chapter, we will build a web application using Spring Boot and Thymeleaf. We will create a Student Management System project to demonstrate the integration of Thymeleaf with Spring Boot, and we will explain Spring Boot auto-configuration for Thymeleaf. This chapter will guide you through setting up the project, configuring Thymeleaf, and building …

Building Web Application using Spring Boot Read More »

Spring Boot Exception Handling

Introduction In this chapter, we will learn about exception handling in Spring Boot 3.2 by building a Library Management System from scratch. We will cover how to set up the project, configure the H2 database, create entities and repositories, handle custom exceptions, and implement global exception handling using the @RestControllerAdvice annotation.

Spring Boot MySQL CRUD Operations: Setup the Spring Boot Project

Introduction In this section of the chapters, we will build CRUD REST APIs for a Student Management System Project with a MySQL database. We will create and set up a Spring Boot project in IntelliJ IDEA, using a three-layer architecture. We will configure the MySQL database, create a Student JPA entity, and a repository to …

Spring Boot MySQL CRUD Operations: Setup the Spring Boot Project Read More »

Spring Boot Project Package Structure

Introduction In this chapter, we will explore the recommended package structure for a Spring Boot project. A well-organized package structure is crucial for maintaining the readability, manageability, and scalability of your application. We will use a typical Spring Boot project structure to illustrate the concepts. Table of Contents Introduction Standard Package Structure Explanation of Each …

Spring Boot Project Package Structure Read More »

Scroll to Top