fix startup

This commit is contained in:
anhefti 2019-08-23 13:30:22 +02:00
parent 20fe964a9f
commit 48f4d29896

View file

@ -79,6 +79,11 @@ class ConfigurationDAOBatchService {
log.info("Registered MyBatis Mappers: {}",
batchSqlSessionTemplate.getConfiguration().getMapperRegistry().getMappers());
// NOTE: sometimes this mapper was not registered on startup. No reason why. Force loading if absent.
if (!batchSqlSessionTemplate.getConfiguration().hasMapper(ConfigurationNodeRecordMapper.class)) {
batchSqlSessionTemplate.getConfiguration().addMapper(ConfigurationNodeRecordMapper.class);
}
this.batchConfigurationNodeRecordMapper =
batchSqlSessionTemplate.getMapper(ConfigurationNodeRecordMapper.class);
this.batchConfigurationValueRecordMapper =