Samples and tutorials for Spring Boot modules such as, but not limited to, Spring Data, Spring Batch, Spring Cloud, Spring Security, Spring GraphQL, and Spring Test. Each tutorial is equipped with source code in individual submodules and can be found on GitHub.

Build Status Badge

Motivation

While it is common to find Spring Boot tutorials on the Internet, it is challenging to find tutorials that are up-to-date and include automated tests to demonstrate the implementation and ensure stability.

Commitment

Continual improvement is fundamental in software development. This repository is committed in ensuring adherence to best practices and keeping all dependencies up-to-date. The quality of these tutorials and the knowledge imparted 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 21 with Spring Boot 3.2.3.

Topics

Topic Description

Spring Batch: Batch Job With REST API source

Spring Batch job that reads information from REST API

Spring Batch: Skip Specific Data

Skip processing specific data based on business logic in Spring Batch

Spring Cloud Environment Repository

Store environment properties in MySQL database with Spring Cloud Environment Repository

Spring Data Domain Events

Publish Domain Events with Spring Data

Spring Data Envers Audit

Enable with Entity Revisions using Spring Data Envers

Spring Data JPA Audit

Enable Audit with Spring Data JPA

Spring Data JPA: Global Filtered Query

Implement global filtered query with Spring Data JPA by defining repositoryBaseClass

Spring Data MongoDB Audit

Enable Audit with Spring Data MongoDB

Spring Data MongoDB: Full Text Search

Implement MongoDB Full Text Search with Spring Data MongoDB

Spring Data MongoDB: Transactional

Enable @Transactional support for Spring Data MongoDB

Spring Data REST: Validation

Perform validation with Spring Data REST

Spring GraphQL Server

Implement GraphQL server with Spring GraphQL Server

jOOQ

Implement an alternative to Jpa using jOOQ and Gradle

LangChain4J

Implement a Historian powered by OpenAI using LangChain4J

Spring Test: Load data with Testcontainers

Load test data with Testcontainers instead of BeforeEach

Spring Test: Test Execution Listeners

Implement custom TestExecutionListener to manage data in tests

Spring Test: Integration with RestAssured

Implement Behaviour Driven Development with RestAssured