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/build.gradle.kts b/build.gradle.kts
index 5e3766a..4290980 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -29,14 +29,14 @@ repositories {
}
dependencies {
- implementation("org.zeroturnaround:zt-exec:1.12")
+ implementation("org.zeroturnaround:zt-exec:1.12")
implementation("org.apache.commons:commons-lang3:3.17.0")
-
implementation("org.springframework.boot:spring-boot-autoconfigure")
- implementation("org.springframework.boot:spring-boot-starter-jdbc")
- implementation("org.xerial:sqlite-jdbc")
- implementation("org.springframework.boot:spring-boot-starter-data-jpa")
- implementation("org.hibernate.orm:hibernate-community-dialects")
+
+ implementation("org.springframework.boot:spring-boot-starter-jdbc")
+ implementation("org.xerial:sqlite-jdbc")
+ implementation("org.springframework.boot:spring-boot-starter-data-jpa")
+ implementation("org.hibernate.orm:hibernate-community-dialects")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
@@ -54,6 +54,8 @@ dependencies {
}
tasks.withType {
- useJUnitPlatform()
+ useJUnitPlatform()
+
+ systemProperty("spring.profiles.active", "test")
testLogging.showStandardStreams = true
}
diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties
new file mode 100644
index 0000000..473dc02
--- /dev/null
+++ b/src/main/resources/application-test.properties
@@ -0,0 +1,2 @@
+#TODO: Use flyway for db setup
+hibernate.hbm2ddl.auto=create-drop
\ 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