From 59949e067bd1ff55ba782a1129ab339ca41fb27a Mon Sep 17 00:00:00 2001 From: Torge Hamann <37174525+torge-hmn@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:52:58 +0100 Subject: [PATCH] Use persistent database and add datasource --- .gitignore | 3 ++- .idea/dataSources.xml | 15 +++++++++++++++ src/main/resources/application.properties | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .idea/dataSources.xml diff --git a/.gitignore b/.gitignore index 5883108..c2263e0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ bin/ ### IntelliJ IDEA ### .idea +!.idea/dataSources.xml *.iws *.iml *.ipr @@ -37,4 +38,4 @@ out/ .vscode/ ### SQLite DB ### -sqlLiteDb \ No newline at end of file +sqLiteDb.db \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..4111f58 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,15 @@ + + + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:sqLiteDb.db + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 177ac97..228334a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,12 +2,12 @@ spring.application.name=home-cert-assistant # Database driverClassName=org.sqlite.JDBC -url=jdbc:sqlite:sqlLiteDb:database?cache=shared +url=jdbc:sqlite:sqLiteDb.db username=admin password=admin spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect #TODO: Use flyway for db setup -hibernate.hbm2ddl.auto=create-drop +hibernate.hbm2ddl.auto=update hibernate.show_sql=true # Logging