From caaf96fb4e2cce8e8d1959436cc8395f3b87d6ab Mon Sep 17 00:00:00 2001 From: wjt Date: Fri, 25 Aug 2023 17:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=B3=A8=E5=86=8C1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/serive/impl/JobServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elastic-job-springboot-core/src/main/java/com/example/serive/impl/JobServiceImpl.java b/elastic-job-springboot-core/src/main/java/com/example/serive/impl/JobServiceImpl.java index 9045a8c..edc2c56 100644 --- a/elastic-job-springboot-core/src/main/java/com/example/serive/impl/JobServiceImpl.java +++ b/elastic-job-springboot-core/src/main/java/com/example/serive/impl/JobServiceImpl.java @@ -66,15 +66,14 @@ public class JobServiceImpl implements JobService { try { Class aClass = Class.forName(job.getJobClass()); SimpleJob simpleJob = (SimpleJob) ctx.getBean(aClass); - new SpringJobScheduler(simpleJob, center, ljc).init(); // 配置数据源 // if (job.isJobEvent()) { // JobEventConfiguration jec = new JobEventRdbConfiguration(dataSource); -// new SpringJobScheduler(elasticJob, center, ljc, jec); +// new SpringJobScheduler(elasticJob, center, ljc, jec).init(); // } 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) { e.printStackTrace(); log.error("加载任务失败,任务为 {}", job.getJobName());