Get server working
This commit is contained in:
parent
994e49057d
commit
dde1d0495c
|
@ -6,7 +6,6 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="target/generated-sources/tinder"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-jpaserver-uhnfhirtest</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>HAPI FHIR - fhirtest.uhn.ca Deployable WAR</name>
|
||||
|
||||
|
@ -215,5 +216,4 @@
|
|||
<finalName>hapi-fhir-jpaserver</finalName>
|
||||
</build>
|
||||
|
||||
<packaging>war</packaging>
|
||||
</project>
|
||||
|
|
|
@ -55,15 +55,21 @@ public class TestRestfulServer extends RestfulServer {
|
|||
myAppCtx = ContextLoaderListener.getCurrentWebApplicationContext();
|
||||
|
||||
List<IResourceProvider> beans;
|
||||
JpaSystemProvider systemProvider;
|
||||
IFhirSystemDao systemDao;
|
||||
switch (fhirVersionParam.trim().toUpperCase()) {
|
||||
case "DSTU":
|
||||
case "DSTU1":
|
||||
setFhirContext(FhirContext.forDstu1());
|
||||
beans = myAppCtx.getBean("myResourceProvidersDstu1", List.class);
|
||||
systemProvider = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProvider.class);
|
||||
systemDao = myAppCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class);
|
||||
break;
|
||||
case "DEV":
|
||||
setFhirContext(FhirContext.forDev());
|
||||
beans = myAppCtx.getBean("myResourceProvidersDev", List.class);
|
||||
systemProvider = myAppCtx.getBean("mySystemProviderDev", JpaSystemProvider.class);
|
||||
systemDao = myAppCtx.getBean("mySystemDaoDev", IFhirSystemDao.class);
|
||||
break;
|
||||
default:
|
||||
throw new ServletException("Unknown FHIR version specified in init-param[FhirVersion]: " + fhirVersionParam);
|
||||
|
@ -76,10 +82,7 @@ public class TestRestfulServer extends RestfulServer {
|
|||
ourLog.info(" * Have resource provider for: {}", nextResourceProvider.getResourceType().getSimpleName());
|
||||
}
|
||||
setResourceProviders(beans);
|
||||
|
||||
IFhirSystemDao systemDao = myAppCtx.getBean(IFhirSystemDao.class);
|
||||
JpaSystemProvider sp = new JpaSystemProvider(systemDao);
|
||||
setPlainProviders(sp);
|
||||
setPlainProviders(systemProvider);
|
||||
|
||||
String implDesc = getInitParameter("ImplementationDescription");
|
||||
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
<bean id="myDaoConfig" class="ca.uhn.fhir.jpa.dao.DaoConfig">
|
||||
</bean>
|
||||
|
||||
<bean id="mySystemDao" class="ca.uhn.fhir.jpa.dao.FhirSystemDao">
|
||||
</bean>
|
||||
|
||||
<bean id="myTxManager" class="org.springframework.orm.jpa.JpaTransactionManager">
|
||||
<property name="entityManagerFactory" ref="myEntityManagerFactory" />
|
||||
</bean>
|
||||
|
|
Loading…
Reference in New Issue