Skip to content

Commit f3ac024

Browse files
authored
Merge branch 'hapifhir:master' into feat/remote-terminology-support
2 parents 0846e9d + 6863e4c commit f3ac024

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ public static Properties getHibernateProperties(
4040
properties.put(strippedKey, entry.getValue().toString());
4141
}
4242

43+
// also check for JPA properties set as environment variables, this is slightly hacky and doesn't cover all
44+
// the naming conventions Springboot allows
45+
// but there doesn't seem to be a better/deterministic way to get these properties when they are set as ENV
46+
// variables and this at least provides
47+
// a way to set them (in a docker container, for instance)
48+
Map<String, Object> jpaPropsEnv = getPropertiesStartingWith(environment, "SPRING_JPA_PROPERTIES");
49+
for (Map.Entry<String, Object> entry : jpaPropsEnv.entrySet()) {
50+
String strippedKey = entry.getKey().replace("SPRING_JPA_PROPERTIES_", "");
51+
strippedKey = strippedKey.replaceAll("_", ".");
52+
strippedKey = strippedKey.toLowerCase();
53+
properties.put(strippedKey, entry.getValue().toString());
54+
}
55+
4356
// Spring Boot Autoconfiguration defaults
4457
properties.putIfAbsent(AvailableSettings.SCANNER, "org.hibernate.boot.archive.scan.internal.DisabledScanner");
4558
properties.putIfAbsent(

src/test/smoketest/plain_server.http

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ GET http://{{host}}/fhir/Patient/{{batch_patient_id}}/$everything
206206

207207
### Extended Operations - validate
208208
# https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_operations.html
209+
# @timeout 180 # wait up to 2 minutes for the validate response
209210
POST http://{{host}}/fhir/Patient/{{batch_patient_id}}/$validate
210211

211212
> {%

0 commit comments

Comments
 (0)