Skip to content

Commit bc758c2

Browse files
committed
refactor: 启动失败 退出进程
1 parent 0429233 commit bc758c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/JetLinksApplication.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@
3636
public class JetLinksApplication {
3737

3838
public static void main(String[] args) {
39-
SpringApplication.run(JetLinksApplication.class, args);
39+
try {
40+
SpringApplication.run(JetLinksApplication.class, args);
41+
} catch (Throwable error) {
42+
System.err.println("startup failed!");
43+
System.exit(1);
44+
}
4045
}
4146

4247

43-
4448
}

0 commit comments

Comments
 (0)