1
0
mirror of https://github.com/pcvolkmer/mv64e-etl-processor synced 2025-09-13 17:02:52 +00:00

feat: add checks for DNPM:DIP backend

Since DNPM:DIP responds with HTTP 404 on API base path, the Kaplan-Meier Config
endpoint will be used to check availability of DNPM:DIP backend API.
This commit is contained in:
2025-03-20 14:39:40 +01:00
parent f347653be8
commit 47ebe46974
2 changed files with 11 additions and 2 deletions

View File

@@ -121,7 +121,15 @@ class RestConnectionCheckService(
fun check() {
result = try {
val available = restTemplate.getForEntity(
restTargetProperties.uri?.replace("/etl/api", "").toString(),
if (restTargetProperties.isBwhc) {
UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString()).path("").toUriString()
} else {
UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString())
.pathSegment("mtb")
.pathSegment("kaplan-meier")
.pathSegment("config")
.toUriString()
},
String::class.java
).statusCode == HttpStatus.OK