Don't lazy load DAOs (#2061)

* Don't lazy load DAOs

* More tweaks
This commit is contained in:
James Agnew 2020-09-01 09:54:50 -04:00 committed by GitHub
parent c6777578a8
commit d8542899e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -44,6 +44,10 @@ public class DaoSearchParamProvider implements ISearchParamProvider {
@Override
public int refreshCache(SearchParamRegistryImpl theSearchParamRegistry, long theRefreshInterval) {
return theSearchParamRegistry.doRefresh(theRefreshInterval);
int retVal = 0;
if (myDaoRegistry.getResourceDao("SearchParameter") != null) {
retVal = theSearchParamRegistry.doRefresh(theRefreshInterval);
}
return retVal;
}
}

View File

@ -51,7 +51,6 @@ public abstract class BaseJavaConfig${versionCapitalized} extends ca.uhn.fhir.jp
#foreach ( $res in $resources )
@Bean(name="my${res.name}Dao${versionCapitalized}", autowire=Autowire.BY_NAME)
@Lazy
public
#if ( ${versionCapitalized} == 'Dstu2' && ${res.name} == 'ValueSet' )
IFhirResourceDaoValueSet<ca.uhn.fhir.model.dstu2.resource.ValueSet, ca.uhn.fhir.model.dstu2.composite.CodingDt, ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt>