+ {{ item.cont }} +
+课程体系
+全面落实立德树人根本任务,CDIO工程教育理念
+专业目标
+全面落实立德树人根本任务,CDIO工程教育理念
+毕业要求
+适应产业与社会变革的国际化应用型人才应具备的能力
+成果展示
++ {{ item.cont }} +
+教师获奖成果
+
+ * 此处的同步是指 当定时任务的执行时间大于任务的时间间隔时
+ * 会等待第一个任务执行完成才会走第二个任务
+ * @author: taoyan
+ * @date: 2020年06月19日
+ */
+@PersistJobDataAfterExecution
+@DisallowConcurrentExecution
+@Slf4j
+public class NewsAsyncJob implements Job {
+
+ @Autowired
+ private NewsPipeline pipeline;
+
+ @Autowired
+ private NewsPageProcessor pageProcessor;
+
+ @Override
+ public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+ log.info(" NewsAsyncJob Execution key:" + jobExecutionContext.getJobDetail().getKey());
+ log.info(String.format("NewsAsyncJob-开始时间:" + DateUtils.getTimestamp()));
+
+ String urlPage1 = "http://sie.huanghuai.edu.cn/index.php/item-list-category-13151.shtml";
+// String urlPageOther = "http://sie.huanghuai.edu.cn/index.php/item-list-category-13151-page-";
+// String url = "";
+ try {
+ Spider.create(pageProcessor)
+ .addUrl(urlPage1)
+ // 抓取到的数据存数据库
+ .addPipeline(pipeline)
+ // 开启2个线程抓取
+ .thread(1)
+ // 异步启动爬虫
+ .start();
+ } catch (Exception ex) {
+ log.error("数据抓取异常:", ex.getMessage());
+ log.error("定时抓取数据线程执行异常", ex);
+ }
+ }
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/NewsWebMagicTask.java b/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/NewsWebMagicTask.java
new file mode 100644
index 0000000..95a236a
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/NewsWebMagicTask.java
@@ -0,0 +1,71 @@
+//package org.jeecg.modules.cms.webmagic.task;
+//
+//import lombok.extern.slf4j.Slf4j;
+//import org.jeecg.modules.cms.webmagic.service.NewsPageProcessor;
+//import org.jeecg.modules.cms.webmagic.service.NewsPipeline;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.scheduling.annotation.Scheduled;
+//import org.springframework.stereotype.Component;
+//import us.codecraft.webmagic.Spider;
+//
+//@Slf4j
+//@Component
+//public class NewsWebMagicTask {
+//
+// @Autowired
+// private NewsPipeline pipeline;
+//
+// @Autowired
+// private NewsPageProcessor pageProcessor;
+//
+// // 每天23点执行一次
+//// @Scheduled(cron = "0 0 23 * * ?")
+// //@Scheduled(cron = "0 40 15 * * ?")
+// // 每隔1分钟执行一次
+//// @Scheduled(cron = "0 */3 * * * ?")
+// public void crawl() {
+// //第1页 http://sie.huanghuai.edu.cn/index.php/item-list-category-13151.shtml
+// //第2页 http://sie.huanghuai.edu.cn/index.php/item-list-category-13151-page-2.html
+// //第3页 http://sie.huanghuai.edu.cn/index.php/item-list-category-13151-page-3.html
+// // ......
+// //第65页 http://sie.huanghuai.edu.cn/index.php/item-list-category-13151-page-65.html
+//
+// String urlPage1 = "http://sie.huanghuai.edu.cn/index.php/item-list-category-13151.shtml";
+// String urlPageOther = "http://sie.huanghuai.edu.cn/index.php/item-list-category-13151-page-";
+// String url = "";
+// try {
+// Spider.create(pageProcessor)
+// .addUrl(urlPage1)
+// // 抓取到的数据存数据库
+// .addPipeline(pipeline)
+// // 开启2个线程抓取
+// .thread(1)
+// // 异步启动爬虫
+// .start();
+// } catch (Exception ex) {
+// log.error("数据抓取异常:", ex.getMessage());
+// log.error("定时抓取数据线程执行异常", ex);
+// }
+//// for (int i = 1; i <= 9; i++) {
+//// if (i == 1) {
+//// url = urlPage1;
+//// } else {
+//// url = urlPageOther + (i + 1) + ".html";
+//// }
+//// log.info("the page {} url:{}", i, url);
+//// try {
+//// Spider.create(pageProcessor)
+//// .addUrl(url)
+//// // 抓取到的数据存数据库
+//// .addPipeline(pipeline)
+//// // 开启2个线程抓取
+//// .thread(3)
+//// // 异步启动爬虫
+//// .start();
+//// } catch (Exception ex) {
+//// log.error("第[{}]页数据抓取异常:", i, ex.getMessage());
+//// log.error("定时抓取数据线程执行异常", ex);
+//// }
+//// }
+// }
+//}
diff --git a/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/SampleJobTest.java b/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/SampleJobTest.java
new file mode 100644
index 0000000..0dad758
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/webmagic/task/SampleJobTest.java
@@ -0,0 +1,22 @@
+package org.jeecg.modules.cms.webmagic.task;
+
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.util.DateUtils;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+/**
+ * 示例不带参定时任务
+ *
+ * @Author Scott
+ */
+@Slf4j
+public class SampleJobTest implements Job {
+
+ @Override
+ public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+ log.info(" >>>>>>>>SampleJobTest Execution key:"+jobExecutionContext.getJobDetail().getKey());
+ log.info(String.format(" 普通定时任务 SampleJobTest,时间:" + DateUtils.getTimestamp()));
+ }
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/pom.xml b/jeecg-boot/jeecg-boot-module-system/pom.xml
index 3e29d9a..15b797d 100644
--- a/jeecg-boot/jeecg-boot-module-system/pom.xml
+++ b/jeecg-boot/jeecg-boot-module-system/pom.xml
@@ -110,6 +110,18 @@