Micronaut With Relation Database and…Tests

Introduction

I am writing this article as I was starting to read about Micronauts.

I have been working with spring-boot over the past years, which seems very complete from my point of view. But, as I was hearing about the Micronauts project I wanted to go through and compare what I would find there with my current experience.

Writing Type-Safe SQL Queries With JPA

JPA is a great technology that maps the database relational model to the Java object-oriented model. It retrieves data and persist back the changes very easily, but it lacks the ability to perform advanced queries. In fact, all the advanced SQL capabilities are simply locked to the Java developer until she chooses to write a hard-to-maintain SQL as a hard-coded string.

FluentJPA project aims to fill this gap in two ways:

How to Use Spring Data JPA and Spring Boot With MariaDB

As you may already be aware, Spring Data JPA is part of the larger Spring Data family. In this article, we are going to use Spring Data JPA along with Spring Boot to communicate with the MariaDB database.

Dependencies

With Spring Boot:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>