use of com.dangdang.ddframe.job.event.rdb.JobEventRdbConfiguration in project loc-framework by lord-of-code.
the class LocElasticJobAutoConfiguration method init.
private void init() {
LocElasticJobProperties elasticJobProperties = resolverJobProperties();
String[] jobs = this.applicationContext.getBeanNamesForAnnotation(LocElasticJob.class);
ZookeeperRegistryCenter registryCenter = registerCenter(elasticJobProperties);
JobEventConfiguration jobEventConfiguration = Optional.ofNullable(Strings.emptyToNull(elasticJobProperties.getDataSource())).map(s -> new JobEventRdbConfiguration(applicationContext.getBean(s + "Ds", DataSource.class))).orElse(null);
createBean(registryCenter, jobEventConfiguration, jobs);
}
Aggregations