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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user