From 88ed318e7610897abbf7956b38ace7947bed2634 Mon Sep 17 00:00:00 2001 From: craig mcclendon Date: Tue, 6 May 2025 13:14:58 -0500 Subject: [PATCH 1/2] process jpa properties set as env variables (#808) * process jpa properties set as env variables * Update src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Jens Kristian Villadsen Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../fhir/jpa/starter/util/EnvironmentHelper.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java b/src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java index e62b089..e22a179 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java @@ -40,6 +40,19 @@ public class EnvironmentHelper { properties.put(strippedKey, entry.getValue().toString()); } + // also check for JPA properties set as environment variables, this is slightly hacky and doesn't cover all + // the naming conventions Springboot allows + // but there doesn't seem to be a better/deterministic way to get these properties when they are set as ENV + // variables and this at least provides + // a way to set them (in a docker container, for instance) + Map jpaPropsEnv = getPropertiesStartingWith(environment, "SPRING_JPA_PROPERTIES"); + for (Map.Entry entry : jpaPropsEnv.entrySet()) { + String strippedKey = entry.getKey().replace("SPRING_JPA_PROPERTIES_", ""); + strippedKey = strippedKey.replaceAll("_", "."); + strippedKey = strippedKey.toLowerCase(); + properties.put(strippedKey, entry.getValue().toString()); + } + // Spring Boot Autoconfiguration defaults properties.putIfAbsent(AvailableSettings.SCANNER, "org.hibernate.boot.archive.scan.internal.DisabledScanner"); properties.putIfAbsent( From 6863e4c1e667afe042754b77c807457252fcb2a3 Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Wed, 7 May 2025 10:35:46 +0200 Subject: [PATCH 2/2] feat: add timeout comment for validate operation in plain_server.http (#817) --- src/test/smoketest/plain_server.http | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/smoketest/plain_server.http b/src/test/smoketest/plain_server.http index 572a48f..72b300a 100644 --- a/src/test/smoketest/plain_server.http +++ b/src/test/smoketest/plain_server.http @@ -206,6 +206,7 @@ GET http://{{host}}/fhir/Patient/{{batch_patient_id}}/$everything ### Extended Operations - validate # https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_operations.html +# @timeout 180 # wait up to 2 minutes for the validate response POST http://{{host}}/fhir/Patient/{{batch_patient_id}}/$validate > {%