Issue 3804 application fails to start 610 pre14 snapshot with beandefinitionoverrideexception invalid bean definition with name loadidsstep (#3819)
* shared steps * Add changelog * Rename as suggested * Remove unnecessary bean * Add missing imports * Remove parent class not used anymore Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local> Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
This commit is contained in:
parent
5586b325ce
commit
8346c0263b
|
@ -1,35 +0,0 @@
|
||||||
package ca.uhn.fhir.batch2.jobs.config;
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* #%L
|
|
||||||
* hapi-fhir-storage-batch2-jobs
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import ca.uhn.fhir.batch2.jobs.step.LoadIdsStep;
|
|
||||||
import ca.uhn.fhir.jpa.api.svc.IBatch2DaoSvc;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class SharedCtx {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public LoadIdsStep loadIdsStep(IBatch2DaoSvc theBatch2DaoSvc) {
|
|
||||||
return new LoadIdsStep(theBatch2DaoSvc);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -22,9 +22,9 @@ package ca.uhn.fhir.batch2.jobs.expunge;
|
||||||
|
|
||||||
import ca.uhn.fhir.batch2.jobs.chunk.PartitionedUrlChunkRangeJson;
|
import ca.uhn.fhir.batch2.jobs.chunk.PartitionedUrlChunkRangeJson;
|
||||||
import ca.uhn.fhir.batch2.jobs.chunk.ResourceIdListWorkChunkJson;
|
import ca.uhn.fhir.batch2.jobs.chunk.ResourceIdListWorkChunkJson;
|
||||||
import ca.uhn.fhir.batch2.jobs.config.SharedCtx;
|
|
||||||
import ca.uhn.fhir.batch2.jobs.parameters.UrlListValidator;
|
import ca.uhn.fhir.batch2.jobs.parameters.UrlListValidator;
|
||||||
import ca.uhn.fhir.batch2.jobs.step.GenerateRangeChunksStep;
|
import ca.uhn.fhir.batch2.jobs.step.GenerateRangeChunksStep;
|
||||||
|
import ca.uhn.fhir.batch2.jobs.step.LoadIdsStep;
|
||||||
import ca.uhn.fhir.batch2.model.JobDefinition;
|
import ca.uhn.fhir.batch2.model.JobDefinition;
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.api.svc.IBatch2DaoSvc;
|
import ca.uhn.fhir.jpa.api.svc.IBatch2DaoSvc;
|
||||||
|
@ -36,7 +36,7 @@ import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class DeleteExpungeAppCtx extends SharedCtx {
|
public class DeleteExpungeAppCtx {
|
||||||
|
|
||||||
public static final String JOB_DELETE_EXPUNGE = "DELETE_EXPUNGE";
|
public static final String JOB_DELETE_EXPUNGE = "DELETE_EXPUNGE";
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class DeleteExpungeAppCtx extends SharedCtx {
|
||||||
"load-ids",
|
"load-ids",
|
||||||
"Load IDs of resources to expunge",
|
"Load IDs of resources to expunge",
|
||||||
ResourceIdListWorkChunkJson.class,
|
ResourceIdListWorkChunkJson.class,
|
||||||
loadIdsStep(theBatch2DaoSvc))
|
new LoadIdsStep(theBatch2DaoSvc))
|
||||||
.addLastStep("expunge",
|
.addLastStep("expunge",
|
||||||
"Perform the resource expunge",
|
"Perform the resource expunge",
|
||||||
expungeStep(theHapiTransactionService, theDeleteExpungeSvc)
|
expungeStep(theHapiTransactionService, theDeleteExpungeSvc)
|
||||||
|
|
|
@ -23,10 +23,10 @@ package ca.uhn.fhir.batch2.jobs.reindex;
|
||||||
import ca.uhn.fhir.batch2.api.IJobCoordinator;
|
import ca.uhn.fhir.batch2.api.IJobCoordinator;
|
||||||
import ca.uhn.fhir.batch2.jobs.chunk.PartitionedUrlChunkRangeJson;
|
import ca.uhn.fhir.batch2.jobs.chunk.PartitionedUrlChunkRangeJson;
|
||||||
import ca.uhn.fhir.batch2.jobs.chunk.ResourceIdListWorkChunkJson;
|
import ca.uhn.fhir.batch2.jobs.chunk.ResourceIdListWorkChunkJson;
|
||||||
import ca.uhn.fhir.batch2.jobs.config.SharedCtx;
|
|
||||||
import ca.uhn.fhir.batch2.jobs.parameters.UrlListValidator;
|
import ca.uhn.fhir.batch2.jobs.parameters.UrlListValidator;
|
||||||
import ca.uhn.fhir.batch2.jobs.parameters.UrlPartitioner;
|
import ca.uhn.fhir.batch2.jobs.parameters.UrlPartitioner;
|
||||||
import ca.uhn.fhir.batch2.jobs.step.GenerateRangeChunksStep;
|
import ca.uhn.fhir.batch2.jobs.step.GenerateRangeChunksStep;
|
||||||
|
import ca.uhn.fhir.batch2.jobs.step.LoadIdsStep;
|
||||||
import ca.uhn.fhir.batch2.model.JobDefinition;
|
import ca.uhn.fhir.batch2.model.JobDefinition;
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.api.svc.IBatch2DaoSvc;
|
import ca.uhn.fhir.jpa.api.svc.IBatch2DaoSvc;
|
||||||
|
@ -36,7 +36,7 @@ import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class ReindexAppCtx extends SharedCtx {
|
public class ReindexAppCtx {
|
||||||
|
|
||||||
public static final String JOB_REINDEX = "REINDEX";
|
public static final String JOB_REINDEX = "REINDEX";
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class ReindexAppCtx extends SharedCtx {
|
||||||
"load-ids",
|
"load-ids",
|
||||||
"Load IDs of resources to reindex",
|
"Load IDs of resources to reindex",
|
||||||
ResourceIdListWorkChunkJson.class,
|
ResourceIdListWorkChunkJson.class,
|
||||||
loadIdsStep(theBatch2DaoSvc))
|
new LoadIdsStep(theBatch2DaoSvc))
|
||||||
.addLastStep("reindex",
|
.addLastStep("reindex",
|
||||||
"Perform the resource reindex",
|
"Perform the resource reindex",
|
||||||
reindexStep()
|
reindexStep()
|
||||||
|
|
Loading…
Reference in New Issue