feat: DB adjustments + connection profile #5
5 changed files with 30 additions and 10 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -19,6 +19,7 @@ bin/
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
### IntelliJ IDEA ###
|
||||||
.idea
|
.idea
|
||||||
|
!.idea/dataSources.xml
|
||||||
*.iws
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
@ -37,4 +38,4 @@ out/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
### SQLite DB ###
|
### SQLite DB ###
|
||||||
sqlLiteDb
|
sqLiteDb.db
|
15
.idea/dataSources.xml
generated
Normal file
15
.idea/dataSources.xml
generated
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
|
<data-source source="LOCAL" name="Database" uuid="f67a83d5-9533-4a9b-acc4-588c2d1ee383">
|
||||||
|
<driver-ref>sqlite.xerial</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:sqlite:sqLiteDb.db</jdbc-url>
|
||||||
|
<jdbc-additional-properties>
|
||||||
|
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||||
|
</jdbc-additional-properties>
|
||||||
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -31,8 +31,8 @@ repositories {
|
||||||
dependencies {
|
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.apache.commons:commons-lang3:3.17.0")
|
||||||
|
|
||||||
implementation("org.springframework.boot:spring-boot-autoconfigure")
|
implementation("org.springframework.boot:spring-boot-autoconfigure")
|
||||||
|
|
||||||
implementation("org.springframework.boot:spring-boot-starter-jdbc")
|
implementation("org.springframework.boot:spring-boot-starter-jdbc")
|
||||||
implementation("org.xerial:sqlite-jdbc")
|
implementation("org.xerial:sqlite-jdbc")
|
||||||
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
||||||
|
@ -55,5 +55,7 @@ dependencies {
|
||||||
|
|
||||||
tasks.withType<Test> {
|
tasks.withType<Test> {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
|
||||||
|
systemProperty("spring.profiles.active", "test")
|
||||||
testLogging.showStandardStreams = true
|
testLogging.showStandardStreams = true
|
||||||
}
|
}
|
||||||
|
|
2
src/main/resources/application-test.properties
Normal file
2
src/main/resources/application-test.properties
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#TODO: Use flyway for db setup
|
||||||
|
hibernate.hbm2ddl.auto=create-drop
|
|
@ -2,12 +2,12 @@
|
||||||
spring.application.name=home-cert-assistant
|
spring.application.name=home-cert-assistant
|
||||||
# Database
|
# Database
|
||||||
driverClassName=org.sqlite.JDBC
|
driverClassName=org.sqlite.JDBC
|
||||||
url=jdbc:sqlite:sqlLiteDb:database?cache=shared
|
url=jdbc:sqlite:sqLiteDb.db
|
||||||
username=admin
|
username=admin
|
||||||
password=admin
|
password=admin
|
||||||
spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect
|
spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect
|
||||||
#TODO: Use flyway for db setup
|
#TODO: Use flyway for db setup
|
||||||
hibernate.hbm2ddl.auto=create-drop
|
hibernate.hbm2ddl.auto=update
|
||||||
hibernate.show_sql=true
|
hibernate.show_sql=true
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
Loading…
Add table
Reference in a new issue