Add service discovery and health fixes: configure Consul registration, update health-check paths and ports, expand scanBasePackages, and ensure consistent service startup across modules.

This commit is contained in:
2026-04-13 23:17:38 +02:00
parent 8e40d13954
commit 19934e2a96
11 changed files with 195 additions and 3 deletions
@@ -0,0 +1,28 @@
spring:
application:
name: billing-service
datasource:
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/pg-meldestelle-db}
username: ${SPRING_DATASOURCE_USERNAME:pg-user}
password: ${SPRING_DATASOURCE_PASSWORD:pg-password}
cloud:
consul:
host: ${CONSUL_HOST:localhost}
port: ${CONSUL_PORT:8500}
discovery:
enabled: true
register: true
health-check-path: /actuator/health
health-check-interval: 10s
server:
port: ${SERVER_PORT:${BILLING_SERVICE_PORT:8087}}
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
show-details: always