Merge commit '528d2bc087ae2f5bf49b2fb38d17dba134feda63'
# Conflicts: # src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigDstu3.java # src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigR4.java # src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigR5.java # src/main/resources/application.yaml Preparing for 5.7.0
This commit is contained in:
@@ -11,7 +11,10 @@ import ca.uhn.fhir.jpa.subscription.channel.subscription.SubscriptionDeliveryHan
|
||||
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
|
||||
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
|
||||
import ca.uhn.fhir.rest.server.mail.MailConfig;
|
||||
import ca.uhn.fhir.rest.server.mail.MailSvc;
|
||||
import com.google.common.base.Strings;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
import org.hl7.fhir.dstu2.model.Subscription;
|
||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -21,8 +24,6 @@ import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* This is the primary configuration file for the example server
|
||||
*/
|
||||
@@ -63,7 +64,7 @@ public class FhirServerConfigCommon {
|
||||
if (appProperties.getSubscription().getEmail() != null) {
|
||||
ourLog.info("Email subscriptions enabled");
|
||||
}
|
||||
|
||||
|
||||
if (appProperties.getEnable_index_contained_resource() == Boolean.TRUE) {
|
||||
ourLog.info("Indexed on contained resource enabled");
|
||||
}
|
||||
@@ -117,6 +118,8 @@ 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;
|
||||
}
|
||||
@@ -137,7 +140,7 @@ public class FhirServerConfigCommon {
|
||||
if(appProperties.getPartitioning().getAllow_references_across_partitions()) {
|
||||
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.ALLOWED_UNQUALIFIED);
|
||||
} else {
|
||||
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.NOT_ALLOWED);
|
||||
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.NOT_ALLOWED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +155,8 @@ public class FhirServerConfigCommon {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ModelConfig modelConfig(AppProperties appProperties) {
|
||||
ModelConfig modelConfig = new ModelConfig();
|
||||
public ModelConfig modelConfig(AppProperties appProperties, DaoConfig daoConfig) {
|
||||
ModelConfig modelConfig = daoConfig.getModelConfig();
|
||||
modelConfig.setAllowContainsSearches(appProperties.getAllow_contains_searches());
|
||||
modelConfig.setAllowExternalReferences(appProperties.getAllow_external_references());
|
||||
modelConfig.setDefaultSearchParamsCanBeOverridden(appProperties.getAllow_override_default_search_params());
|
||||
@@ -170,7 +173,7 @@ public class FhirServerConfigCommon {
|
||||
}
|
||||
|
||||
modelConfig.setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||
|
||||
|
||||
modelConfig.setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
|
||||
return modelConfig;
|
||||
}
|
||||
@@ -217,10 +220,9 @@ public class FhirServerConfigCommon {
|
||||
mailConfig.setSmtpPassword(email.getPassword());
|
||||
mailConfig.setSmtpUseStartTLS(email.getStartTlsEnable());
|
||||
|
||||
IEmailSender emailSender = new EmailSenderImpl(mailConfig);
|
||||
IEmailSender emailSender = new EmailSenderImpl(new MailSvc(mailConfig));
|
||||
|
||||
if(subscriptionDeliveryHandlerFactory.isPresent())
|
||||
subscriptionDeliveryHandlerFactory.get().setEmailSender(emailSender);
|
||||
subscriptionDeliveryHandlerFactory.ifPresent(theSubscriptionDeliveryHandlerFactory -> theSubscriptionDeliveryHandlerFactory.setEmailSender(emailSender));
|
||||
|
||||
return emailSender;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user