Spring Boot + Spring JPA with PostgreSQL or MySQL or Oracle or SQL Server database and Thymeleaf using Gradle

Here we will see how to build a sample full stack web application using Spring Boot, Spring JPA with database like PostgreSQL, MySQL or Oracle Thymeleaf and Gradle. This example is very similar with my other example regarding Spring boot with H2 database: Spring Boot H2 data source with Thymeleaf using Gradle The only exception here, we will use some production database like postgres as database. So there are changes around Spring JPA configuration and Gradle build file.

Spring Boot H2 datasource with Thymeleaf using Gradle

In this example, we will see how to build a simple web application in Spring boot with Thymeleaf as template engine and H2 database as embedded or in-memory database. Gradle has been used as build and dependency management tool. We will create a sample Student Information System where we can enter Student record in one panel and see the existing records in another panel. Here is a screenshot of the web page for this: