Spring Boot Application Overview

Description

This course represents a high-level Spring Boot application development overview. The course is focused on typical steps that can occur during the development of a Spring Boot Application. Details are omitted. E.g. in the persistence layer section transaction propagation and isolation levels are not covered. However, the typical transaction demarcation layout, steps that can be useful for local development, and examples of tests are presented.

spring boot application overview

Topics

Create Spring Boot Application

The first steps for the application creation are covered. Spring initializer is used for repository creation. Package layout is described.


Persistence Layer. Theory

The typical actions for the Spring Boot Application persistence layer are reviewed. Issues with local development, unit and integration testing, database migration are covered.


Persistence Layer.Implementation

Actions from the previous topic are implemented. Spring Data, Docker Compose, PostgreSQL, Liquibase, Hibernate, Mockito, Testcontainers are used.


Java Types Mappings

MapStruct is added to the application as an example of declarative Java Types Mapping. It allows to remove boilerplate code for mapping from one Java Type to another.


Exception Handling

The most common way of exception handling in a single component is implemented. It can be implemented only once and used as a handler for all application exceptions.


Distributed Cache

Redis is used as a distributed cache. It can be used to optimize your application. However, in some cases it can be harmful.


API Documentation

Swagger is added to the application to provide API documentation.


Monitoring

Spring Boot Actuator, Prometheus, and Grafana are added to the application for monitoring purposes.