Java

Spring Boot + DataJpaTest: Testing JPA Repositories with a Real Database

Introduction The @DataJpaTest annotation in Spring Boot is specifically designed for testing JPA repositories in an isolated manner. Instead of bootstrapping the entire application context, it initializes only the components relevant to JPA, such as entities, repositories, and the database configuration. By default, @DataJpaTest: Scans for @Entity classes and configures Spring Data JPA repositories. Automatically […]

Spring Boot + DataJpaTest: Testing JPA Repositories with a Real Database Read More »

Spring Boot + Liquibase

Introduction Liquibase is a powerful tool for managing database schema changes. It allows for automatic application, rollback, and tracking of database structure changes in Spring Boot projects. An alternative tool is Flyway, which is also widely used for database migrations. The key differences between them are: Liquibase supports migrations in XML, YAML, JSON, and SQL

Spring Boot + Liquibase Read More »

Spring Boot + Flyway

What are we going to build? In this tutorial, we will set up a Spring Boot application that integrates with Flyway for seamless database migrations. We’ll use PostgreSQL as our database, running in a Docker container. The API will expose device data stored in the database. What is Flyway? Flyway is a database migration tool

Spring Boot + Flyway Read More »

Quarkus REST API

Building a Mock Device Server with Quarkus   Introduction   What are we going to build? In this tutorial, we will create a mock device server using Quarkus. This server will expose a REST API that generates and returns mock device data based on a request parameter. What will our API do? GET /devices?amount=5 →

Quarkus REST API Read More »