Merge pull request #2300 from hapifhir/2299-bug-with-bulk-export-bean

Add bean to config
This commit is contained in:
Tadgh 2021-01-18 16:53:36 -05:00 committed by GitHub
commit 17d74648de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 9 deletions

View File

@ -0,0 +1,4 @@
---
type: fix
issue: 2299
title: "The BulkExportDaoSvc bean was forgotten from the BaseConfig context. It has been added."

View File

@ -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() {

View File

@ -50,10 +50,6 @@ public class BulkExportDaoSvc {
IBulkExportCollectionDao myBulkExportCollectionDao;
@Autowired
IBulkExportCollectionFileDao myBulkExportCollectionFileDao;
@Autowired
private FhirContext myFhirContext;
@Autowired
private DaoRegistry myDaoRegistry;
@Transactional
public void addFileToCollectionWithId(Long theCollectionEntityId, BulkExportCollectionFileEntity theFile) {
@ -65,7 +61,6 @@ public class BulkExportDaoSvc {
myBulkExportCollectionFileDao.saveAndFlush(theFile);
myBulkExportCollectionDao.saveAndFlush(exportCollectionEntity);
}
}
@Transactional

View File

@ -220,6 +220,7 @@ public abstract class BaseConfig {
return new BatchJobSubmitterImpl();
}
@Lazy
@Bean
public CascadingDeleteInterceptor cascadingDeleteInterceptor(FhirContext theFhirContext, DaoRegistry theDaoRegistry, IInterceptorBroadcaster theInterceptorBroadcaster) {

View File

@ -73,10 +73,6 @@ public class TestR4Config extends BaseJavaConfigR4 {
return new CircularQueueCaptureQueriesListener();
}
@Bean
public BulkExportDaoSvc bulkExportDaoSvc() {
return new BulkExportDaoSvc();
}
@Bean
public DataSource dataSource() {