4
pom.xml
4
pom.xml
@@ -14,13 +14,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>5.5.1</version>
|
<version>5.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>8</java.version>
|
<java.version>8</java.version>
|
||||||
|
<spring_boot_version>2.5.6</spring_boot_version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sun.mail</groupId>
|
<groupId>com.sun.mail</groupId>
|
||||||
<artifactId>javax.mail</artifactId>
|
<artifactId>javax.mail</artifactId>
|
||||||
|
<version>1.6.2</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>javax.activation</groupId>
|
<groupId>javax.activation</groupId>
|
||||||
|
|||||||
@@ -29,16 +29,6 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
/*
|
|
||||||
* https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/246
|
|
||||||
* This will be allowed for a short period until we know how MDM should be configured
|
|
||||||
* or don't have multiple equal bean instantiations.
|
|
||||||
*
|
|
||||||
* This will require changes in the main project as stated in the Github comment
|
|
||||||
* */
|
|
||||||
System.setProperty("spring.main.allow-bean-definition-overriding","true");
|
|
||||||
|
|
||||||
System.setProperty("spring.batch.job.enabled", "false");
|
|
||||||
SpringApplication.run(Application.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
|
|
||||||
//Server is now accessible at eg. http://localhost:8080/fhir/metadata
|
//Server is now accessible at eg. http://localhost:8080/fhir/metadata
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.hibernate.search.engine.cfg.BackendSettings;
|
|||||||
import org.hibernate.search.mapper.orm.automaticindexing.session.AutomaticIndexingSynchronizationStrategyNames;
|
import org.hibernate.search.mapper.orm.automaticindexing.session.AutomaticIndexingSynchronizationStrategyNames;
|
||||||
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
||||||
import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName;
|
import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy;
|
import org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy;
|
||||||
import org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy;
|
import org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy;
|
||||||
import org.springframework.core.env.CompositePropertySource;
|
import org.springframework.core.env.CompositePropertySource;
|
||||||
@@ -25,7 +26,8 @@ import java.util.*;
|
|||||||
|
|
||||||
public class EnvironmentHelper {
|
public class EnvironmentHelper {
|
||||||
|
|
||||||
public static Properties getHibernateProperties(ConfigurableEnvironment environment) {
|
public static Properties getHibernateProperties(ConfigurableEnvironment environment,
|
||||||
|
ConfigurableListableBeanFactory myConfigurableListableBeanFactory) {
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
Map<String, Object> jpaProps = getPropertiesStartingWith(environment, "spring.jpa.properties");
|
Map<String, Object> jpaProps = getPropertiesStartingWith(environment, "spring.jpa.properties");
|
||||||
for (Map.Entry<String, Object> entry : jpaProps.entrySet()) {
|
for (Map.Entry<String, Object> entry : jpaProps.entrySet()) {
|
||||||
@@ -41,7 +43,7 @@ public class EnvironmentHelper {
|
|||||||
//properties.putIfAbsent(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(beanFactory));
|
//properties.putIfAbsent(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(beanFactory));
|
||||||
|
|
||||||
//hapi-fhir-jpaserver-base "sensible defaults"
|
//hapi-fhir-jpaserver-base "sensible defaults"
|
||||||
Map<String, Object> hapiJpaPropertyMap = new HapiFhirLocalContainerEntityManagerFactoryBean().getJpaPropertyMap();
|
Map<String, Object> hapiJpaPropertyMap = new HapiFhirLocalContainerEntityManagerFactoryBean(myConfigurableListableBeanFactory).getJpaPropertyMap();
|
||||||
hapiJpaPropertyMap.forEach(properties::putIfAbsent);
|
hapiJpaPropertyMap.forEach(properties::putIfAbsent);
|
||||||
|
|
||||||
//hapi-fhir-jpaserver-starter defaults
|
//hapi-fhir-jpaserver-starter defaults
|
||||||
@@ -73,7 +75,7 @@ public class EnvironmentHelper {
|
|||||||
ElasticsearchHibernatePropertiesBuilder builder = new ElasticsearchHibernatePropertiesBuilder();
|
ElasticsearchHibernatePropertiesBuilder builder = new ElasticsearchHibernatePropertiesBuilder();
|
||||||
IndexStatus requiredIndexStatus = environment.getProperty("elasticsearch.required_index_status", IndexStatus.class);
|
IndexStatus requiredIndexStatus = environment.getProperty("elasticsearch.required_index_status", IndexStatus.class);
|
||||||
builder.setRequiredIndexStatus(requireNonNullElse(requiredIndexStatus, IndexStatus.YELLOW));
|
builder.setRequiredIndexStatus(requireNonNullElse(requiredIndexStatus, IndexStatus.YELLOW));
|
||||||
builder.setRestUrl(getElasticsearchServerUrl(environment));
|
builder.setHosts(getElasticsearchServerUrl(environment));
|
||||||
builder.setUsername(getElasticsearchServerUsername(environment));
|
builder.setUsername(getElasticsearchServerUsername(environment));
|
||||||
builder.setPassword(getElasticsearchServerPassword(environment));
|
builder.setPassword(getElasticsearchServerPassword(environment));
|
||||||
builder.setProtocol(getElasticsearchServerProtocol(environment));
|
builder.setProtocol(getElasticsearchServerProtocol(environment));
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
|||||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings.CrossPartitionReferenceMode;
|
import ca.uhn.fhir.jpa.model.config.PartitionSettings.CrossPartitionReferenceMode;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.subscription.channel.subscription.SubscriptionDeliveryHandlerFactory;
|
import ca.uhn.fhir.jpa.subscription.channel.subscription.SubscriptionDeliveryHandlerFactory;
|
||||||
|
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
|
||||||
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
|
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
|
||||||
import ca.uhn.fhir.jpa.subscription.match.deliver.email.JavaMailEmailSender;
|
import ca.uhn.fhir.rest.server.mail.MailConfig;
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import org.hl7.fhir.dstu2.model.Subscription;
|
import org.hl7.fhir.dstu2.model.Subscription;
|
||||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||||
@@ -207,22 +208,21 @@ public class FhirServerConfigCommon {
|
|||||||
@Bean()
|
@Bean()
|
||||||
public IEmailSender emailSender(AppProperties appProperties, Optional<SubscriptionDeliveryHandlerFactory> subscriptionDeliveryHandlerFactory) {
|
public IEmailSender emailSender(AppProperties appProperties, Optional<SubscriptionDeliveryHandlerFactory> subscriptionDeliveryHandlerFactory) {
|
||||||
if (appProperties.getSubscription() != null && appProperties.getSubscription().getEmail() != null) {
|
if (appProperties.getSubscription() != null && appProperties.getSubscription().getEmail() != null) {
|
||||||
JavaMailEmailSender retVal = new JavaMailEmailSender();
|
MailConfig mailConfig = new MailConfig();
|
||||||
|
|
||||||
AppProperties.Subscription.Email email = appProperties.getSubscription().getEmail();
|
AppProperties.Subscription.Email email = appProperties.getSubscription().getEmail();
|
||||||
retVal.setSmtpServerHostname(email.getHost());
|
mailConfig.setSmtpHostname(email.getHost());
|
||||||
retVal.setSmtpServerPort(email.getPort());
|
mailConfig.setSmtpPort(email.getPort());
|
||||||
retVal.setSmtpServerUsername(email.getUsername());
|
mailConfig.setSmtpUsername(email.getUsername());
|
||||||
retVal.setSmtpServerPassword(email.getPassword());
|
mailConfig.setSmtpPassword(email.getPassword());
|
||||||
retVal.setAuth(email.getAuth());
|
mailConfig.setSmtpUseStartTLS(email.getStartTlsEnable());
|
||||||
retVal.setStartTlsEnable(email.getStartTlsEnable());
|
|
||||||
retVal.setStartTlsRequired(email.getStartTlsRequired());
|
IEmailSender emailSender = new EmailSenderImpl(mailConfig);
|
||||||
retVal.setQuitWait(email.getQuitWait());
|
|
||||||
|
|
||||||
if(subscriptionDeliveryHandlerFactory.isPresent())
|
if(subscriptionDeliveryHandlerFactory.isPresent())
|
||||||
subscriptionDeliveryHandlerFactory.get().setEmailSender(retVal);
|
subscriptionDeliveryHandlerFactory.get().setEmailSender(emailSender);
|
||||||
|
|
||||||
return retVal;
|
return emailSender;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu2;
|
|||||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||||
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU2Condition;
|
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU2Condition;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -58,8 +59,9 @@ public class FhirServerConfigDstu2 extends BaseJavaConfigDstu2 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Bean()
|
@Bean()
|
||||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
|
||||||
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory();
|
ConfigurableListableBeanFactory myConfigurableListableBeanFactory) {
|
||||||
|
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(myConfigurableListableBeanFactory);
|
||||||
retVal.setPersistenceUnitName("HAPI_PU");
|
retVal.setPersistenceUnitName("HAPI_PU");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -67,7 +69,7 @@ public class FhirServerConfigDstu2 extends BaseJavaConfigDstu2 {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
||||||
}
|
}
|
||||||
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment));
|
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment, myConfigurableListableBeanFactory));
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import javax.annotation.PostConstruct;
|
|||||||
import javax.persistence.EntityManagerFactory;
|
import javax.persistence.EntityManagerFactory;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -62,8 +63,9 @@ public class FhirServerConfigDstu3 extends BaseJavaConfigDstu3 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Bean
|
@Bean
|
||||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
|
||||||
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory();
|
ConfigurableListableBeanFactory myConfigurableListableBeanFactory) {
|
||||||
|
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(myConfigurableListableBeanFactory);
|
||||||
retVal.setPersistenceUnitName("HAPI_PU");
|
retVal.setPersistenceUnitName("HAPI_PU");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -72,7 +74,8 @@ public class FhirServerConfigDstu3 extends BaseJavaConfigDstu3 {
|
|||||||
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment));
|
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment,
|
||||||
|
myConfigurableListableBeanFactory));
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,8 +99,7 @@ public class FhirServerConfigDstu3 extends BaseJavaConfigDstu3 {
|
|||||||
}
|
}
|
||||||
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
||||||
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
||||||
int elasticsearchPort = Integer.parseInt(elasticsearchUrl.substring(elasticsearchUrl.lastIndexOf(":")+1));
|
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchUsername, elasticsearchPassword);
|
||||||
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchPort, elasticsearchUsername, elasticsearchPassword);
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
|||||||
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
||||||
import ca.uhn.fhir.jpa.starter.cql.StarterCqlR4Config;
|
import ca.uhn.fhir.jpa.starter.cql.StarterCqlR4Config;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.*;
|
||||||
import org.springframework.core.env.ConfigurableEnvironment;
|
import org.springframework.core.env.ConfigurableEnvironment;
|
||||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||||
@@ -58,8 +59,9 @@ public class FhirServerConfigR4 extends BaseJavaConfigR4 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Bean()
|
@Bean()
|
||||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
|
||||||
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory();
|
ConfigurableListableBeanFactory myConfigurableListableBeanFactory) {
|
||||||
|
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(myConfigurableListableBeanFactory);
|
||||||
retVal.setPersistenceUnitName("HAPI_PU");
|
retVal.setPersistenceUnitName("HAPI_PU");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -68,7 +70,8 @@ public class FhirServerConfigR4 extends BaseJavaConfigR4 {
|
|||||||
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment));
|
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment,
|
||||||
|
myConfigurableListableBeanFactory));
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +96,7 @@ public class FhirServerConfigR4 extends BaseJavaConfigR4 {
|
|||||||
|
|
||||||
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
||||||
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
||||||
int elasticsearchPort = Integer.parseInt(elasticsearchUrl.substring(elasticsearchUrl.lastIndexOf(":")+1));
|
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchUsername, elasticsearchPassword);
|
||||||
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchPort, elasticsearchUsername, elasticsearchPassword);
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
|||||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.starter.annotations.OnR5Condition;
|
import ca.uhn.fhir.jpa.starter.annotations.OnR5Condition;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -59,8 +60,9 @@ public class FhirServerConfigR5 extends BaseJavaConfigR5 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Bean()
|
@Bean()
|
||||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
|
||||||
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory();
|
ConfigurableListableBeanFactory myConfigurableListableBeanFactory) {
|
||||||
|
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory(myConfigurableListableBeanFactory);
|
||||||
retVal.setPersistenceUnitName("HAPI_PU");
|
retVal.setPersistenceUnitName("HAPI_PU");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -69,7 +71,8 @@ public class FhirServerConfigR5 extends BaseJavaConfigR5 {
|
|||||||
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
throw new ConfigurationException("Could not set the data source due to a configuration issue", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment));
|
retVal.setJpaProperties(EnvironmentHelper.getHibernateProperties(configurableEnvironment,
|
||||||
|
myConfigurableListableBeanFactory));
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +96,7 @@ public class FhirServerConfigR5 extends BaseJavaConfigR5 {
|
|||||||
}
|
}
|
||||||
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
String elasticsearchUsername = EnvironmentHelper.getElasticsearchServerUsername(configurableEnvironment);
|
||||||
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
String elasticsearchPassword = EnvironmentHelper.getElasticsearchServerPassword(configurableEnvironment);
|
||||||
int elasticsearchPort = Integer.parseInt(elasticsearchUrl.substring(elasticsearchUrl.lastIndexOf(":")+1));
|
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchUsername, elasticsearchPassword);
|
||||||
return new ElasticsearchSvcImpl(elasticsearchHost, elasticsearchPort, elasticsearchUsername, elasticsearchPassword);
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ spring:
|
|||||||
# database connection pool size
|
# database connection pool size
|
||||||
hikari:
|
hikari:
|
||||||
maximum-pool-size: 10
|
maximum-pool-size: 10
|
||||||
|
flyway:
|
||||||
|
check-location: false
|
||||||
jpa:
|
jpa:
|
||||||
properties:
|
properties:
|
||||||
hibernate.format_sql: false
|
hibernate.format_sql: false
|
||||||
@@ -31,9 +33,6 @@ spring:
|
|||||||
batch:
|
batch:
|
||||||
job:
|
job:
|
||||||
enabled: false
|
enabled: false
|
||||||
main:
|
|
||||||
# TODO 5.6.0 -> Prevent duplicate bean definitions in the Spring batch config in HAPI: see:
|
|
||||||
allow-bean-definition-overriding: true
|
|
||||||
hapi:
|
hapi:
|
||||||
fhir:
|
fhir:
|
||||||
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
||||||
|
|||||||
Reference in New Issue
Block a user