Merge pull request #1204 from volsch/fixes/example_server_subscriptions

Subscriptions are not enabled in JPA Server Example 3.7.0.
This commit is contained in:
James Agnew 2019-02-10 10:22:07 -05:00 committed by GitHub
commit 6af36eb063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.time.DateUtils;
import org.hibernate.jpa.HibernatePersistenceProvider;
import org.hl7.fhir.instance.model.Subscription;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,6 +44,10 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 {
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.setAllowMultipleDelete(true);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
retVal.setSubscriptionMatchingEnabled(true);
return retVal;
}