someone owes me a beer ... or twenty
This commit is contained in:
@@ -4,17 +4,17 @@ import ca.uhn.fhir.context.FhirContext;
|
|||||||
import ca.uhn.fhir.empi.api.IEmpiSettings;
|
import ca.uhn.fhir.empi.api.IEmpiSettings;
|
||||||
import ca.uhn.fhir.empi.rules.config.EmpiRuleValidator;
|
import ca.uhn.fhir.empi.rules.config.EmpiRuleValidator;
|
||||||
import ca.uhn.fhir.empi.rules.config.EmpiSettings;
|
import ca.uhn.fhir.empi.rules.config.EmpiSettings;
|
||||||
import ca.uhn.fhir.jpa.empi.svc.EmpiSearchParamSvc;
|
import ca.uhn.fhir.jpa.empi.config.EmpiConsumerConfig;
|
||||||
|
import ca.uhn.fhir.jpa.empi.config.EmpiSubmitterConfig;
|
||||||
import ca.uhn.fhir.jpa.starter.AppProperties;
|
import ca.uhn.fhir.jpa.starter.AppProperties;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRetriever;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRetriever;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.core.io.DefaultResourceLoader;
|
import org.springframework.core.io.DefaultResourceLoader;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
@@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@Conditional(EmpiConfigCondition.class)
|
@Conditional(EmpiConfigCondition.class)
|
||||||
|
@Import({EmpiConsumerConfig.class, EmpiSubmitterConfig.class})
|
||||||
public class EmpiConfig {
|
public class EmpiConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@@ -33,12 +34,6 @@ public class EmpiConfig {
|
|||||||
return new EmpiRuleValidator(theFhirContext, theSearchParamRetriever);
|
return new EmpiRuleValidator(theFhirContext, theSearchParamRetriever);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
EmpiSearchParamSvc empiSearchParamSvc() {
|
|
||||||
return new EmpiSearchParamSvc();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
IEmpiSettings empiSettings(@Autowired EmpiRuleValidator theEmpiRuleValidator, AppProperties appProperties) throws IOException {
|
IEmpiSettings empiSettings(@Autowired EmpiRuleValidator theEmpiRuleValidator, AppProperties appProperties) throws IOException {
|
||||||
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
|
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||||||
|
|
||||||
@ServletComponentScan(basePackageClasses = {
|
@ServletComponentScan(basePackageClasses = {
|
||||||
JpaRestfulServer.class}, basePackages = "ca.uhn.fhir.jpa.starter")
|
JpaRestfulServer.class}, basePackages = "ca.uhn.fhir.jpa.starter")
|
||||||
@SpringBootApplication(exclude = ElasticsearchRestClientAutoConfiguration.class)
|
@SpringBootApplication(exclude = {ElasticsearchRestClientAutoConfiguration.class}, scanBasePackages = {"ca.uhn.fhir.jpa.starter"})
|
||||||
@Import({SubscriptionSubmitterConfig.class, SubscriptionProcessorConfig.class, SubscriptionChannelConfig.class, WebsocketDispatcherConfig.class, EmpiConfig.class})
|
@Import({SubscriptionSubmitterConfig.class, SubscriptionProcessorConfig.class, SubscriptionChannelConfig.class, WebsocketDispatcherConfig.class, EmpiConfig.class})
|
||||||
public class Application extends SpringBootServletInitializer {
|
public class Application extends SpringBootServletInitializer {
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||||||
"spring.profiles.active=r4",
|
"spring.profiles.active=r4",
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
||||||
"hapi.fhir.subscription.websocket_enabled=true",
|
"hapi.fhir.subscription.websocket_enabled=true",
|
||||||
"hapi.fhir.empi_enabled=true"
|
"hapi.fhir.empi_enabled=true",
|
||||||
|
//Override is currently required when using Empi as the construction of the Empi beans are ambiguous as they are constructed multiple places. This is evident when running in a spring boot environment
|
||||||
|
"spring.main.allow-bean-definition-overriding=true"
|
||||||
})
|
})
|
||||||
public class ExampleServerR4IT {
|
public class ExampleServerR4IT {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user