From 178253de5a8a345b68aaccaab528ac5b2cb74fa1 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Fri, 16 Oct 2020 18:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=99=A8=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=A7=84=E8=8C=83=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 5 ++-- .../xxl-job-executor-sample-jfinal/pom.xml | 8 ++++- .../jfinal/XxlJobExecutorApplication.java | 12 ++++++++ .../jfinal/config/JFinalCoreConfig.java | 29 +++++++------------ 4 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/XxlJobExecutorApplication.java diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index ac1462ee..c4701a7d 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -2046,8 +2046,9 @@ data: post-data - 8、调度线程连接池优化,修复连接有效性校验超时问题; - 9、轮训路由策略优化,修复小概率下并发问题; - 10、执行器日志清理优化,修复小概率下日志文件为空导致清理异常问题; -- 11、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等; -- 12、[规划中]分片任务:全部完成后才会出发后置节点; +- 11、执行器示例项目规范整理; +- 12、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等; +- 13、[规划中]分片任务:全部完成后才会出发后置节点; ### 7.32 版本 v2.3.0 Release Notes[规划中] - 1、[规划中]DAG流程任务 diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/pom.xml index 435d284f..56342ff1 100644 --- a/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/pom.xml +++ b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/pom.xml @@ -15,10 +15,16 @@ com.jfinal - jfinal + jfinal-undertow 2.2 + + com.jfinal + jfinal + 4.9.02 + + org.slf4j diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/XxlJobExecutorApplication.java b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/XxlJobExecutorApplication.java new file mode 100644 index 00000000..f68b4f3c --- /dev/null +++ b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/XxlJobExecutorApplication.java @@ -0,0 +1,12 @@ +package com.xuxueli.executor.sample.jfinal; + +import com.jfinal.server.undertow.UndertowServer; +import com.xuxueli.executor.sample.jfinal.config.JFinalCoreConfig; + +public class XxlJobExecutorApplication { + + public static void main(String[] args) { + UndertowServer.start(JFinalCoreConfig.class, 8082, true); + } + +} diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/config/JFinalCoreConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/config/JFinalCoreConfig.java index 199954b6..7e20da83 100644 --- a/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/config/JFinalCoreConfig.java +++ b/xxl-job-executor-samples/xxl-job-executor-sample-jfinal/src/main/java/com/xuxueli/executor/sample/jfinal/config/JFinalCoreConfig.java @@ -3,6 +3,7 @@ package com.xuxueli.executor.sample.jfinal.config; import com.jfinal.config.*; import com.jfinal.kit.Prop; import com.jfinal.kit.PropKit; +import com.jfinal.template.Engine; import com.xuxueli.executor.sample.jfinal.controller.IndexController; import com.xuxueli.executor.sample.jfinal.jobhandler.CommandJobHandler; import com.xuxueli.executor.sample.jfinal.jobhandler.DemoJobHandler; @@ -58,35 +59,27 @@ public class JFinalCoreConfig extends JFinalConfig { // ---------------------- jfinal ---------------------- - public void configRoute(Routes route) { - route.add("/", IndexController.class); - } - @Override - public void afterJFinalStart() { + public void onStart() { initXxlJobExecutor(); } @Override - public void beforeJFinalStop() { + public void onStop() { destoryXxlJobExecutor(); } - public void configConstant(Constants constants) { - - } - - public void configPlugin(Plugins plugins) { - + public void configConstant(Constants me) { + me.setDevMode(true); } - public void configInterceptor(Interceptors interceptors) { - - } - - public void configHandler(Handlers handlers) { - + public void configRoute(Routes routes) { + routes.add("/", IndexController.class); } + public void configEngine(Engine me) {} + public void configPlugin(Plugins me) {} + public void configInterceptor(Interceptors me) {} + public void configHandler(Handlers me) {} }