Converted to named indicies in order to support easier environment configuration for both tester and IG setup

This commit is contained in:
jvi
2020-11-27 14:49:53 +01:00
parent 557d7955d8
commit 77a98ca438
4 changed files with 39 additions and 37 deletions

View File

@@ -36,15 +36,15 @@ public class FhirTesterConfig {
@Bean
public TesterConfig testerConfig(AppProperties appProperties) {
TesterConfig retVal = new TesterConfig();
appProperties.getTester().stream().forEach(t -> {
appProperties.getTester().entrySet().stream().forEach(t -> {
retVal
.addServer()
.withId(t.getId())
.withFhirVersion(t.getFhir_version())
.withBaseUrl(t.getServer_address())
.withName(t.getName());
.withId(t.getKey())
.withFhirVersion(t.getValue().getFhir_version())
.withBaseUrl(t.getValue().getServer_address())
.withName(t.getValue().getName());
retVal.setRefuseToFetchThirdPartyUrls(
t.getRefuse_to_fetch_third_party_urls());
t.getValue().getRefuse_to_fetch_third_party_urls());
});
return retVal;