feat(zns-importer): add ZNSImportService with tests and REST controller

- Created `ZnsImportService` to handle uploading, parsing, and persisting ZNS data from legacy `.zip` files.
- Introduced corresponding test cases in `ZnsImportServiceTest` for handling edge cases including imports and updates.
- Added REST controller `ZnsImportController` for initiating import jobs and retrieving their status.
- Defined `ZnsImportResult` data structure for reporting results of import operations.
- Established database configuration specific to ZNS importer for development profile.
- Updated utility libraries with `FixedWidthLineReader` for fixed-width string parsing.
- Refactored architecture by placing parser logic in `core:zns-parser` for reuse across backend and Compose Desktop app.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-03-25 14:43:01 +01:00
parent 4e8ed21ac0
commit 9d08cb0f72
21 changed files with 1653 additions and 22 deletions
@@ -0,0 +1,34 @@
server:
port: ${ZNS_IMPORT_SERVER_PORT:8095}
spring:
application:
name: zns-import-service
profiles:
active: ${SPRING_PROFILES_ACTIVE:dev}
datasource:
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/pg-meldestelle-db}
username: ${SPRING_DATASOURCE_USERNAME:pg-user}
password: ${SPRING_DATASOURCE_PASSWORD:pg-password}
driver-class-name: org.postgresql.Driver
servlet:
multipart:
enabled: true
max-file-size: 50MB
max-request-size: 50MB
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: always
app:
service-name: ${spring.application.name}