Fix startup issue
This commit is contained in:
parent
2bf578879a
commit
f8cbd27957
|
@ -66,6 +66,7 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
|
|||
|
||||
@Override
|
||||
protected IValueExtractor getPathValueExtractor(IBaseResource theResource, String theSinglePath) {
|
||||
start(null);
|
||||
return () -> {
|
||||
List<IBase> values = new ArrayList<>();
|
||||
List<Base> allValues = myFhirPathEngine.evaluate((Base) theResource, theSinglePath);
|
||||
|
@ -80,10 +81,11 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
|
|||
@EventListener
|
||||
public void start(ContextRefreshedEvent theEvent) {
|
||||
if (myValidationSupport == null) {
|
||||
myValidationSupport = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), myValidationSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myValidationSupport = support;
|
||||
}
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), myValidationSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,11 +71,12 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
|
|||
@PostConstruct
|
||||
public void initFhirPath() {
|
||||
if (myValidationSupport == null) {
|
||||
myValidationSupport = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), myValidationSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR4HostServices());
|
||||
myValidationSupport = support;
|
||||
}
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), myValidationSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR4HostServices());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue