API implementation using Spring Boot
Spring Boot is the most popular Java framework for microservice applications. It provides embedded servlet containers such as Tomcat, Jetty, and Undertow. Embedding a container allows you to package your application as an executable JAR file that can be run directly without needing to deploy your application to a separate application server. We are going to use Tomcat as it is the default.
Our application will provide some endpoints and will use an SQL database. We will use H2, which is a lightweight and open source database. It can function as both an in-memory and filesystem database, making it easily usable in development environments without the need for additional infrastructure.
We are going to use a Spring Data dependency to integrate with the persistence layer, but since this is not the focus of the book, we won’t delve deep into it. We recommend the book Persistence Best Practices for Java Applications, by Otávio Santana...