From 1036cd16d3377e27e294dee8fe3d5c3bafd6e034 Mon Sep 17 00:00:00 2001 From: Stian Lyng <stianlyng@protonmail.com> Date: Wed, 19 Apr 2023 09:08:37 +0200 Subject: [PATCH] change from jdbc to jpa --- pom.xml | 5 ++++- src/main/resources/application.properties | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8f9b9d6a..aa4fe905 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,10 @@ <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> - + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-resource-server</artifactId> diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index dced60ae..bb3cf470 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -5,6 +5,16 @@ spring.datasource.username=smartmat_user spring.datasource.password=Eyhs1OJxyZC56NQCrV7yAolEk9AkLAsC spring.datasource.driver-class-name=org.postgresql.Driver +# jpa settings +spring.jpa.show-sql=true + +## Hibernate Properties +# The SQL dialect makes Hibernate generate better SQL for the chosen database +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect + +# Hibernate ddl auto (create, create-drop, validate, update) +spring.jpa.hibernate.ddl-auto = update + ## info # Hostname: dpg-cgv5710dh87i4q0fd1b0-a -- GitLab