From db9ed84d74a5b0062106506a90f4c8307129bbfd Mon Sep 17 00:00:00 2001 From: Justin McKelvy <60718638+Capt-Mac@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:35:08 -0600 Subject: [PATCH] add config for postinit provider loading --- .../ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java | 9 ++++++++- .../ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java index 645d053..6afcbc3 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java @@ -1,12 +1,14 @@ package ca.uhn.fhir.jpa.starter.cr; -import ca.uhn.fhir.cr.config.dstu3.CrDstu3Config; import ca.uhn.fhir.cr.config.dstu3.ApplyOperationConfig; +import ca.uhn.fhir.cr.config.dstu3.CrDstu3Config; import ca.uhn.fhir.cr.config.dstu3.ExtractOperationConfig; import ca.uhn.fhir.cr.config.dstu3.PackageOperationConfig; import ca.uhn.fhir.cr.config.dstu3.PopulateOperationConfig; import ca.uhn.fhir.jpa.starter.AppProperties; import ca.uhn.fhir.jpa.starter.annotations.OnDSTU3Condition; +import ca.uhn.fhir.rest.server.RestfulServer; +import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory; import org.cqframework.cql.cql2elm.CqlCompilerOptions; import org.cqframework.cql.cql2elm.model.CompiledLibrary; import org.cqframework.cql.cql2elm.model.Model; @@ -131,4 +133,9 @@ public class StarterCrDstu3Config { return new ConcurrentHashMap<>(); } + @Bean + public PostInitProviderRegisterer postInitProviderRegisterer(RestfulServer theRestfulServer, + ResourceProviderFactory theResourceProviderFactory) { + return new PostInitProviderRegisterer(theRestfulServer, theResourceProviderFactory);} + } diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java index b0888b4..0d63e3e 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java @@ -7,6 +7,8 @@ import ca.uhn.fhir.cr.config.r4.ExtractOperationConfig; import ca.uhn.fhir.cr.config.r4.PackageOperationConfig; import ca.uhn.fhir.cr.config.r4.PopulateOperationConfig; import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition; +import ca.uhn.fhir.rest.server.RestfulServer; +import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Import; @@ -158,4 +160,10 @@ public class StarterCrR4Config { return new ConcurrentHashMap<>(); } + @Bean + public PostInitProviderRegisterer postInitProviderRegisterer(RestfulServer theRestfulServer, + ResourceProviderFactory theResourceProviderFactory) { + return new PostInitProviderRegisterer(theRestfulServer, theResourceProviderFactory); + } + }