Spring Boot Tutorials contains various tutorials for various Spring projects such as Spring Boot, Spring Security, Spring Data, Spring Batch, Spring Cloud, Spring Security, Spring GraphQL, and Spring Modulith. Each tutorial comes with source code in individual submodules and can be found on GitHub.
These tutorials are created with testing and best practices in mind, inspired by daily work and questions from the community. The goal is to provide a reference for developers to learn and apply in their projects. I have chosen not to use mock frameworks in tests, opting instead to write integration tests with actual databases and services. This is, and always will be, my primary goal.
With the help of Dependabot, each tutorial is also kept up-to-date with the latest dependencies. Currently, we are using Java Temurin 25 with Spring Boot 4.1.1.
All tutorials are documented in AsciiDoc format and published as an Antora site at rashidi.github.io/spring-boot-tutorials.
| Tutorial | Description |
|---|---|
Spring Batch job that reads information from REST API |
|
Skip processing specific data based on business logic in Spring Batch |
|
Store environment properties in MySQL database with Spring Cloud Environment Repository |
|
Publish Domain Events with Spring Data |
|
Enable with Entity Revisions using Spring Data Envers |
|
Enable Audit with Spring Data JDBC |
|
Implement Optimistic Locking with Spring Data JDBC using @Version |
|
Generate Liquibase changeset with Spring Data JDBC |
|
Enable Audit with Spring Data JPA |
|
Implement |
|
Implement global filtered query with Spring Data JPA by defining |
|
Spring Data JPA: Hibernate Second Level Caching with EhCache |
Implement Hibernate second level caching using Spring Data JPA and EhCache to improve application performance |
Spring Data Redis: Implementing Caching with Spring Data Redis |
Implement caching with Spring Data Redis to improve application performance and compare with Hibernate second level caching |
Enable Audit with Spring Data MongoDB |
|
Implement MongoDB Full Text Search with Spring Data MongoDB |
|
Load data dynamically with Testcontainers for Spring Data MongoDB |
|
Enable |
|
Customize Spring Data Repository with |
|
Expose entities with composite ID using Spring Data REST |
|
Implement custom validation for Spring Data REST endpoints |
|
Getting started with Spring GraphQL |
|
Typesafe SQL with jOOQ and Spring Boot |
|
Building modular applications with Spring Modulith |
|
Implement resilient event publication with Spring Modulith and PostgreSQL Outbox |
|
Custom |
|
Integration testing with REST Assured |
|
Implementing Slice Tests for REST application |
|
Implement synchronous REST client using |
|
Prevent Cross-Site Scripting (XSS) with Thymeleaf |