JDBC
spring data jpa is better !

pom.xml
<!-- for jdbc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>
<!-- for migrations of table to db -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>Configuration for PostgreSQL
For flyway migration
If you are using Flyway for db migration, create a folder
db/migrationsinside resource folderName the migration
V[number]__[name of migration].sqlExample :
V1__InitTables.sql
Configuring HikariDataSource
HikariDataSourceQueries
RowMapper<T>
RowMapper<T>Last updated
Was this helpful?