feat(horses-service): remove integration tests and obsolete configurations

- Deleted outdated integration test classes (`HorseServiceIntegrationTest`, `TransactionalContextTest`, and others) and test resources (`logback-test.xml`).
- Removed obsolete Gradle dependencies related to these tests and revised project module references.
- Simplified `DomPferd` domain model with minor refactorings for serialization and validation.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-03-23 15:20:16 +01:00
parent c53daa926a
commit ceb1ccdab8
30 changed files with 890 additions and 797 deletions
@@ -13,8 +13,8 @@ dependencies {
implementation(projects.platform.platformDependencies)
implementation(projects.core.coreDomain)
implementation(projects.core.coreUtils)
implementation(projects.persons.personsDomain)
implementation(projects.persons.personsInfrastructure)
implementation(projects.backend.services.persons.personsDomain)
implementation(projects.backend.services.persons.personsInfrastructure)
implementation(libs.spring.boot.starter.web)
implementation(libs.spring.boot.starter.validation)
@@ -23,6 +23,7 @@ dependencies {
implementation(libs.exposed.core)
implementation(libs.exposed.dao)
implementation(libs.exposed.jdbc)
implementation(libs.exposed.migration.jdbc)
implementation(libs.exposed.kotlin.datetime)
implementation(libs.hikari.cp)
runtimeOnly(libs.postgresql.driver)
@@ -3,8 +3,8 @@ package at.mocode.persons.service.config
import at.mocode.persons.infrastructure.persistence.ZnsPersonTable
import jakarta.annotation.PostConstruct
import org.jetbrains.exposed.v1.jdbc.Database
import org.jetbrains.exposed.v1.jdbc.SchemaUtils
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
import org.jetbrains.exposed.v1.migration.jdbc.MigrationUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Configuration
@@ -24,7 +24,8 @@ class PersonsDatabaseConfiguration(
log.info("Initialisiere Datenbank-Schema für Persons-Service...")
Database.connect(jdbcUrl, user = username, password = password)
transaction {
SchemaUtils.createMissingTablesAndColumns(ZnsPersonTable)
val statements = MigrationUtils.statementsRequiredForDatabaseMigration(ZnsPersonTable)
statements.forEach { exec(it) }
log.info("Datenbank-Schema erfolgreich initialisiert")
}
}
@@ -1,9 +1,9 @@
package at.mocode.persons.service.dev
import at.mocode.persons.infrastructure.persistence.ZnsPersonTable
import org.jetbrains.exposed.v1.jdbc.SchemaUtils
import org.jetbrains.exposed.v1.jdbc.batchInsert
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
import org.jetbrains.exposed.v1.migration.jdbc.MigrationUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.CommandLineRunner
@@ -36,7 +36,8 @@ class ZnsPersonSeeder(
}
log.info("Starte ZNS-Personen-Import aus: {}", dir.absolutePath)
transaction {
SchemaUtils.createMissingTablesAndColumns(ZnsPersonTable)
val statements = MigrationUtils.statementsRequiredForDatabaseMigration(ZnsPersonTable)
statements.forEach { exec(it) }
}
seedPersons(dir)
log.info("ZNS-Personen-Import abgeschlossen.")