diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java deleted file mode 100644 index fda416e..0000000 --- a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xuxueli.executor.sample.frameless; - -import com.xuxueli.executor.sample.frameless.config.FrameLessXxlJobConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.TimeUnit; - -/** - * @author xuxueli 2018-10-31 19:05:43 - */ -public class Application { - private static Logger logger = LoggerFactory.getLogger(Application.class); - - public static void main(String[] args) { - - try { - // start - FrameLessXxlJobConfig.getInstance().initXxlJobExecutor(); - - while (true) { - TimeUnit.HOURS.sleep(1); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } finally { - // destory - FrameLessXxlJobConfig.getInstance().destoryXxlJobExecutor(); - } - - } - -} diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java deleted file mode 100644 index fda416e..0000000 --- a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xuxueli.executor.sample.frameless; - -import com.xuxueli.executor.sample.frameless.config.FrameLessXxlJobConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.TimeUnit; - -/** - * @author xuxueli 2018-10-31 19:05:43 - */ -public class Application { - private static Logger logger = LoggerFactory.getLogger(Application.class); - - public static void main(String[] args) { - - try { - // start - FrameLessXxlJobConfig.getInstance().initXxlJobExecutor(); - - while (true) { - TimeUnit.HOURS.sleep(1); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } finally { - // destory - FrameLessXxlJobConfig.getInstance().destoryXxlJobExecutor(); - } - - } - -} diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/FramelessApplication.java b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/FramelessApplication.java new file mode 100644 index 0000000..092aa4b --- /dev/null +++ b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/FramelessApplication.java @@ -0,0 +1,38 @@ +package com.xuxueli.executor.sample.frameless; + +import com.xuxueli.executor.sample.frameless.config.FrameLessXxlJobConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.TimeUnit; + +/** + * @author xuxueli 2018-10-31 19:05:43 + */ +public class FramelessApplication { + private static Logger logger = LoggerFactory.getLogger(FramelessApplication.class); + + public static void main(String[] args) { + + try { + // start + FrameLessXxlJobConfig.getInstance().initXxlJobExecutor(); + + // Blocks until interrupted + while (true) { + try { + TimeUnit.HOURS.sleep(1); + } catch (InterruptedException e) { + break; + } + } + } catch (Exception e) { + logger.error(e.getMessage(), e); + } finally { + // destory + FrameLessXxlJobConfig.getInstance().destoryXxlJobExecutor(); + } + + } + +}