Add local_base_urls configuration to feed DaoConfig.setTreatBaseUrlsAsLocal()
This commit is contained in:
@@ -11,10 +11,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
@ConfigurationProperties(prefix = "hapi.fhir")
|
||||
@Configuration
|
||||
@@ -77,6 +74,7 @@ public class AppProperties {
|
||||
|
||||
private Integer bundle_batch_pool_size = 20;
|
||||
private Integer bundle_batch_pool_max_size = 100;
|
||||
private List<String> local_base_urls = new ArrayList<>();
|
||||
|
||||
public Boolean getUse_apache_address_strategy() {
|
||||
return use_apache_address_strategy;
|
||||
@@ -190,7 +188,11 @@ public class AppProperties {
|
||||
this.supported_resource_types = supported_resource_types;
|
||||
}
|
||||
|
||||
public Logger getLogger() {
|
||||
public List<String> getSupported_resource_types(List<String> supported_resource_types) {
|
||||
return this.supported_resource_types;
|
||||
}
|
||||
|
||||
public Logger getLogger() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
@@ -499,6 +501,10 @@ public class AppProperties {
|
||||
this.bundle_batch_pool_max_size = bundle_batch_pool_max_size;
|
||||
}
|
||||
|
||||
public List<String> getLocal_base_urls() {
|
||||
return local_base_urls;
|
||||
}
|
||||
|
||||
public static class Cors {
|
||||
private Boolean allow_Credentials = true;
|
||||
private List<String> allowed_origin = ImmutableList.of("*");
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -121,6 +122,7 @@ public class FhirServerConfigCommon {
|
||||
|
||||
retVal.setFilterParameterEnabled(appProperties.getFilter_search_enabled());
|
||||
retVal.setAdvancedLuceneIndexing(appProperties.getAdvanced_lucene_indexing());
|
||||
retVal.setTreatBaseUrlsAsLocal(new HashSet<>(appProperties.getLocal_base_urls()));
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ hapi:
|
||||
# fhirpath_interceptor_enabled: false
|
||||
# filter_search_enabled: true
|
||||
# graphql_enabled: true
|
||||
# local_base_urls:
|
||||
# - http://hapi.fhir.org/baseR4
|
||||
#partitioning:
|
||||
# cross_partition_reference_mode: true
|
||||
# multitenancy_enabled: true
|
||||
|
||||
Reference in New Issue
Block a user