Upgrade to 3.7.0
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>3.6.0</version>
|
<version>3.7.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>ca.uhn.hapi.fhir.demo</groupId>
|
<groupId>ca.uhn.hapi.fhir.demo</groupId>
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import java.util.Properties;
|
|||||||
import javax.persistence.EntityManagerFactory;
|
import javax.persistence.EntityManagerFactory;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.search.LuceneSearchMappingFactory;
|
import ca.uhn.fhir.jpa.search.LuceneSearchMappingFactory;
|
||||||
import ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect;
|
import ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect;
|
||||||
import org.apache.commons.dbcp2.BasicDataSource;
|
import org.apache.commons.dbcp2.BasicDataSource;
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||||
|
import org.hl7.fhir.instance.model.Subscription;
|
||||||
import org.springframework.beans.factory.annotation.Autowire;
|
import org.springframework.beans.factory.annotation.Autowire;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -38,9 +40,23 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 {
|
|||||||
public DaoConfig daoConfig() {
|
public DaoConfig daoConfig() {
|
||||||
DaoConfig retVal = new DaoConfig();
|
DaoConfig retVal = new DaoConfig();
|
||||||
retVal.setAllowMultipleDelete(true);
|
retVal.setAllowMultipleDelete(true);
|
||||||
|
|
||||||
|
// You can enable these if you want to support Subscriptions from your server
|
||||||
|
if (false) {
|
||||||
|
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
|
||||||
|
}
|
||||||
|
if (false) {
|
||||||
|
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
|
||||||
|
}
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ModelConfig modelConfig() {
|
||||||
|
return new ModelConfig();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a
|
* The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a
|
||||||
* directory called "jpaserver_derby_files".
|
* directory called "jpaserver_derby_files".
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
|
|||||||
import ca.uhn.fhir.jpa.provider.dstu3.JpaSystemProviderDstu3;
|
import ca.uhn.fhir.jpa.provider.dstu3.JpaSystemProviderDstu3;
|
||||||
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3;
|
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3;
|
||||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||||
import ca.uhn.fhir.jpa.subscription.resthook.SubscriptionRestHookInterceptor;
|
|
||||||
import ca.uhn.fhir.model.dstu2.composite.MetaDt;
|
import ca.uhn.fhir.model.dstu2.composite.MetaDt;
|
||||||
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
||||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||||
@@ -22,6 +21,7 @@ import ca.uhn.fhir.rest.server.RestfulServer;
|
|||||||
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
|
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
|
||||||
import org.hl7.fhir.dstu3.model.Bundle;
|
import org.hl7.fhir.dstu3.model.Bundle;
|
||||||
import org.hl7.fhir.dstu3.model.Meta;
|
import org.hl7.fhir.dstu3.model.Meta;
|
||||||
|
import org.hl7.fhir.instance.model.Subscription;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.context.ContextLoaderListener;
|
import org.springframework.web.context.ContextLoaderListener;
|
||||||
@@ -162,26 +162,12 @@ public class JpaServerDemo extends RestfulServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// If you want to enable the $trigger-subscription operation to allow
|
||||||
* If you want to support subscriptions, you will want to register interceptors for
|
// manual triggering of a subscription delivery, enable this provider
|
||||||
* any type of subscriptions you want to support.
|
if (false) { // <-- DISABLED RIGHT NOW
|
||||||
*/
|
|
||||||
boolean subscriptionsEnabled = false;
|
|
||||||
if (subscriptionsEnabled) { // <-- DISABLED RIGHT NOW
|
|
||||||
SubscriptionRestHookInterceptor restHookInterceptor = myAppCtx.getBean(SubscriptionRestHookInterceptor.class);
|
|
||||||
registerInterceptor(restHookInterceptor);
|
|
||||||
|
|
||||||
// You might alo want to enable other subscription interceptors too
|
|
||||||
// eg...
|
|
||||||
// myAppCtx.getBean(SubscriptionWebsocketInterceptor.class);
|
|
||||||
// myAppCtx.getBean(SubscriptionEmailInterceptor.class);
|
|
||||||
|
|
||||||
// If you want to enable the $trigger-subscription operation to allow
|
|
||||||
// manual triggering of a subscription delivery, enable this provider
|
|
||||||
SubscriptionTriggeringProvider retriggeringProvider = myAppCtx.getBean(SubscriptionTriggeringProvider.class);
|
SubscriptionTriggeringProvider retriggeringProvider = myAppCtx.getBean(SubscriptionTriggeringProvider.class);
|
||||||
registerProvider(retriggeringProvider);
|
registerProvider(retriggeringProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user