Add startup fix for scheduling-service: configure application.yml, set service port to 8089, include spring-boot-starter-actuator for health checks, and document changes.
This commit is contained in:
parent
d4509d6c5a
commit
2ee9ccf8e9
|
|
@ -21,6 +21,7 @@ dependencies {
|
|||
implementation(libs.bundles.jackson.kotlin)
|
||||
implementation(libs.kotlin.reflect)
|
||||
implementation(libs.spring.cloud.starter.consul.discovery)
|
||||
implementation(libs.spring.boot.starter.actuator)
|
||||
implementation(libs.caffeine)
|
||||
implementation(libs.spring.web)
|
||||
implementation(libs.bundles.resilience)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
spring:
|
||||
application:
|
||||
name: scheduling-service
|
||||
datasource:
|
||||
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:pg-meldestelle-db}
|
||||
username: ${DB_USER:pg-user}
|
||||
password: ${DB_PASS:pg-pass}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
cloud:
|
||||
consul:
|
||||
host: ${CONSUL_HOST:localhost}
|
||||
port: ${CONSUL_PORT:8500}
|
||||
discovery:
|
||||
prefer-ip-address: true
|
||||
instance-id: ${spring.application.name}:${random.value}
|
||||
health-check-path: /actuator/health
|
||||
|
||||
server:
|
||||
port: 8089
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "*"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Curator Log - 13.04.2026 - Scheduling Service Startup Fix
|
||||
|
||||
## Problem
|
||||
Der `scheduling-service` konnte nicht starten, da keine Konfigurationsdatei (`application.yml`) vorhanden war. Zudem fehlte der `spring-boot-starter-actuator` für die Health-Checks, was eine korrekte Registrierung und Überwachung in Consul verhinderte.
|
||||
|
||||
## Lösung
|
||||
1. **Konfiguration erstellt:** `backend/services/scheduling/scheduling-service/src/main/resources/application.yml` wurde mit Standardwerten erstellt.
|
||||
2. **Port-Zuweisung:** Der Service wurde auf Port **8089** konfiguriert, um Konflikte mit anderen Services zu vermeiden.
|
||||
3. **Abhängigkeiten ergänzt:** `spring-boot-starter-actuator` wurde in der `build.gradle.kts` hinzugefügt.
|
||||
4. **Consul-Integration:** Health-Check-Pfad und IP-Präferenz wurden für den Betrieb in Docker-Umgebungen optimiert.
|
||||
|
||||
## Verifizierung
|
||||
- Erfolgreicher Start via `./gradlew :backend:services:scheduling:scheduling-service:bootRun`.
|
||||
- Health-Status "UP" unter `http://localhost:8089/actuator/health` bestätigt.
|
||||
- "passing" Status in Consul verifiziert.
|
||||
|
||||
**Status:** ✅ Stabilisiert
|
||||
Loading…
Reference in New Issue
Block a user