소스 검색

update document

xuxueli 5 년 전
부모
커밋
4f5b8814d8

xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/Application.java → xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/java/com/xuxueli/executor/sample/frameless/FramelessApplication.java 파일 보기

9
 /**
9
 /**
10
  * @author xuxueli 2018-10-31 19:05:43
10
  * @author xuxueli 2018-10-31 19:05:43
11
  */
11
  */
12
-public class Application {
13
-    private static Logger logger = LoggerFactory.getLogger(Application.class);
12
+public class FramelessApplication {
13
+    private static Logger logger = LoggerFactory.getLogger(FramelessApplication.class);
14
 
14
 
15
     public static void main(String[] args) {
15
     public static void main(String[] args) {
16
 
16
 
18
             // start
18
             // start
19
             FrameLessXxlJobConfig.getInstance().initXxlJobExecutor();
19
             FrameLessXxlJobConfig.getInstance().initXxlJobExecutor();
20
 
20
 
21
+            // Blocks until interrupted
21
             while (true) {
22
             while (true) {
22
-                TimeUnit.HOURS.sleep(1);
23
+                try {
24
+                    TimeUnit.HOURS.sleep(1);
25
+                } catch (InterruptedException e) {
26
+                    break;
27
+                }
23
             }
28
             }
24
         } catch (Exception e) {
29
         } catch (Exception e) {
25
             logger.error(e.getMessage(), e);
30
             logger.error(e.getMessage(), e);