From 8f72970063d908cf8c92210dad1bb8200493dfe3 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 18 Jan 2021 14:09:38 -0500 Subject: [PATCH] Add bean to config --- .../java/ca/uhn/fhir/jpa/bulk/job/BulkExportJobConfig.java | 6 ++++++ .../src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java | 2 ++ .../src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/BulkExportJobConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/BulkExportJobConfig.java index bfe08e51b5e..d3ebcba1c6c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/BulkExportJobConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/BulkExportJobConfig.java @@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.bulk.job; */ import ca.uhn.fhir.jpa.batch.processors.PidToIBaseResourceProcessor; +import ca.uhn.fhir.jpa.bulk.svc.BulkExportDaoSvc; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import org.hl7.fhir.instance.model.api.IBaseResource; import org.springframework.batch.core.Job; @@ -54,6 +55,11 @@ public class BulkExportJobConfig { @Autowired private PidToIBaseResourceProcessor myPidToIBaseResourceProcessor; + @Bean + public BulkExportDaoSvc bulkExportDaoSvc() { + return new BulkExportDaoSvc(); + } + @Bean @Lazy public Job bulkExportJob() { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index bdffba29f46..c3b00c46da3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -19,6 +19,7 @@ import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor; import ca.uhn.fhir.jpa.bulk.api.IBulkDataExportSvc; import ca.uhn.fhir.jpa.bulk.provider.BulkDataExportProvider; import ca.uhn.fhir.jpa.bulk.svc.BulkDataExportSvcImpl; +import ca.uhn.fhir.jpa.bulk.svc.BulkExportDaoSvc; import ca.uhn.fhir.jpa.cache.IResourceVersionSvc; import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl; import ca.uhn.fhir.jpa.dao.DaoSearchParamProvider; @@ -220,6 +221,7 @@ public abstract class BaseConfig { return new BatchJobSubmitterImpl(); } + @Lazy @Bean public CascadingDeleteInterceptor cascadingDeleteInterceptor(FhirContext theFhirContext, DaoRegistry theDaoRegistry, IInterceptorBroadcaster theInterceptorBroadcaster) { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 8849f1acf06..474403f05c3 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -73,10 +73,6 @@ public class TestR4Config extends BaseJavaConfigR4 { return new CircularQueueCaptureQueriesListener(); } - @Bean - public BulkExportDaoSvc bulkExportDaoSvc() { - return new BulkExportDaoSvc(); - } @Bean public DataSource dataSource() {