|
|
@ -66,15 +66,14 @@ public class JobServiceImpl implements JobService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Class<?> aClass = Class.forName(job.getJobClass());
|
|
|
|
Class<?> aClass = Class.forName(job.getJobClass());
|
|
|
|
SimpleJob simpleJob = (SimpleJob) ctx.getBean(aClass);
|
|
|
|
SimpleJob simpleJob = (SimpleJob) ctx.getBean(aClass);
|
|
|
|
new SpringJobScheduler(simpleJob, center, ljc).init();
|
|
|
|
|
|
|
|
// 配置数据源
|
|
|
|
// 配置数据源
|
|
|
|
// if (job.isJobEvent()) {
|
|
|
|
// if (job.isJobEvent()) {
|
|
|
|
// JobEventConfiguration jec = new JobEventRdbConfiguration(dataSource);
|
|
|
|
// JobEventConfiguration jec = new JobEventRdbConfiguration(dataSource);
|
|
|
|
// new SpringJobScheduler(elasticJob, center, ljc, jec);
|
|
|
|
// new SpringJobScheduler(elasticJob, center, ljc, jec).init();
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// new SpringJobScheduler(elasticJob, center, ljc);
|
|
|
|
// new SpringJobScheduler(elasticJob, center, ljc).init();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
new SpringJobScheduler(simpleJob, center, ljc);
|
|
|
|
new SpringJobScheduler(simpleJob, center, ljc).init();
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
log.error("加载任务失败,任务为 {}", job.getJobName());
|
|
|
|
log.error("加载任务失败,任务为 {}", job.getJobName());
|
|
|
|