Fix backend infrastructure issues for results-service, series-service, and events-service; integrate @EnableDiscoveryClient and Consul support; convert Series domain entities to data class; and update Gradle dependencies and configurations.
This commit is contained in:
@@ -30,6 +30,7 @@ dependencies {
|
||||
implementation(libs.spring.boot.starter.web)
|
||||
implementation(libs.spring.boot.starter.validation)
|
||||
implementation(libs.spring.boot.starter.actuator)
|
||||
implementation(libs.spring.cloud.starter.consul.discovery)
|
||||
|
||||
runtimeOnly(libs.postgresql.driver)
|
||||
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ package at.mocode.events.service
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
|
||||
|
||||
/**
|
||||
* Main application class for the Events Service.
|
||||
@@ -9,6 +10,7 @@ import org.springframework.boot.runApplication
|
||||
* This service provides APIs for managing events and competitions.
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
class EventsServiceApplication
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
spring:
|
||||
application:
|
||||
name: events-service
|
||||
main:
|
||||
banner-mode: "off"
|
||||
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
|
||||
flyway:
|
||||
enabled: true
|
||||
baseline-on-migrate: true
|
||||
cloud:
|
||||
consul:
|
||||
host: ${SPRING_CLOUD_CONSUL_HOST:localhost}
|
||||
port: ${SPRING_CLOUD_CONSUL_PORT:8500}
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
discovery:
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
register: ${CONSUL_ENABLED:true}
|
||||
health-check-path: /actuator/health
|
||||
health-check-interval: 10s
|
||||
instance-id: ${spring.application.name}-${server.port}-${random.uuid}
|
||||
service-name: ${spring.application.name}
|
||||
|
||||
server:
|
||||
port: 8085
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "health,info,metrics,prometheus"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
prometheus:
|
||||
metrics:
|
||||
export:
|
||||
enabled: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
at.mocode.events: DEBUG
|
||||
+2
@@ -2,6 +2,7 @@ package at.mocode.masterdata.service
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
|
||||
|
||||
/**
|
||||
* Main application class for the Masterdata Service.
|
||||
@@ -9,6 +10,7 @@ import org.springframework.boot.runApplication
|
||||
* This service provides APIs for managing master data such as countries, regions, and other reference data.
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
class MasterdataServiceApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
@@ -18,6 +18,9 @@ dependencies {
|
||||
implementation(libs.bundles.spring.boot.service.complete)
|
||||
implementation(libs.postgresql.driver)
|
||||
implementation(libs.spring.boot.starter.web)
|
||||
implementation(libs.spring.boot.starter.data.jpa)
|
||||
implementation(libs.spring.boot.starter.validation)
|
||||
implementation(libs.spring.boot.starter.actuator)
|
||||
|
||||
// KORREKTUR: Jackson Bundle aufgelöst
|
||||
implementation(libs.jackson.module.kotlin)
|
||||
|
||||
+2
@@ -4,9 +4,11 @@ import at.mocode.results.service.application.ResultsService
|
||||
import at.mocode.results.service.domain.Ergebnis
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
|
||||
import org.springframework.web.bind.annotation.*
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
class ResultsServiceApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
spring:
|
||||
application:
|
||||
name: results-service
|
||||
main:
|
||||
banner-mode: "off"
|
||||
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
|
||||
flyway:
|
||||
enabled: true
|
||||
baseline-on-migrate: true
|
||||
cloud:
|
||||
consul:
|
||||
host: ${SPRING_CLOUD_CONSUL_HOST:localhost}
|
||||
port: ${SPRING_CLOUD_CONSUL_PORT:8500}
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
discovery:
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
register: ${CONSUL_ENABLED:true}
|
||||
health-check-path: /actuator/health
|
||||
health-check-interval: 10s
|
||||
instance-id: ${spring.application.name}-${server.port}-${random.uuid}
|
||||
service-name: ${spring.application.name}
|
||||
|
||||
server:
|
||||
port: 8088
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "health,info,metrics,prometheus"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
prometheus:
|
||||
metrics:
|
||||
export:
|
||||
enabled: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
at.mocode.results: DEBUG
|
||||
@@ -18,6 +18,9 @@ dependencies {
|
||||
implementation(libs.bundles.spring.boot.service.complete)
|
||||
implementation(libs.postgresql.driver)
|
||||
implementation(libs.spring.boot.starter.web)
|
||||
implementation(libs.spring.boot.starter.data.jpa)
|
||||
implementation(libs.spring.boot.starter.validation)
|
||||
implementation(libs.spring.boot.starter.actuator)
|
||||
|
||||
// KORREKTUR: Jackson Bundle aufgelöst
|
||||
implementation(libs.jackson.module.kotlin)
|
||||
|
||||
+2
@@ -5,9 +5,11 @@ import at.mocode.series.service.domain.Serie
|
||||
import at.mocode.series.service.domain.SeriePunkt
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
|
||||
import org.springframework.web.bind.annotation.*
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
class SeriesServiceApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import java.util.*
|
||||
|
||||
@Entity
|
||||
@Table(name = "serien")
|
||||
class Serie(
|
||||
data class Serie(
|
||||
@Id
|
||||
val id: String = UUID.randomUUID().toString(),
|
||||
|
||||
@@ -46,7 +46,7 @@ enum class Bindungstyp {
|
||||
|
||||
@Entity
|
||||
@Table(name = "serie_punkte")
|
||||
class SeriePunkt(
|
||||
data class SeriePunkt(
|
||||
@Id
|
||||
val id: String = UUID.randomUUID().toString(),
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
spring:
|
||||
application:
|
||||
name: series-service
|
||||
main:
|
||||
banner-mode: "off"
|
||||
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
|
||||
flyway:
|
||||
enabled: true
|
||||
baseline-on-migrate: true
|
||||
cloud:
|
||||
consul:
|
||||
host: ${SPRING_CLOUD_CONSUL_HOST:localhost}
|
||||
port: ${SPRING_CLOUD_CONSUL_PORT:8500}
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
discovery:
|
||||
enabled: ${CONSUL_ENABLED:true}
|
||||
register: ${CONSUL_ENABLED:true}
|
||||
health-check-path: /actuator/health
|
||||
health-check-interval: 10s
|
||||
instance-id: ${spring.application.name}-${server.port}-${random.uuid}
|
||||
service-name: ${spring.application.name}
|
||||
|
||||
server:
|
||||
port: 8089
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "health,info,metrics,prometheus"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
prometheus:
|
||||
metrics:
|
||||
export:
|
||||
enabled: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
at.mocode.series: DEBUG
|
||||
Reference in New Issue
Block a user