Archived
0

Core: корректное завершение работы

This commit is contained in:
2017-05-12 23:44:50 +03:00
parent affa8c62c2
commit 6696986717
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
group = 'asys' group = 'asys'
version = '0.3.1-SNAPSHOT' version = '0.3.2-SNAPSHOT'
apply plugin: 'application' apply plugin: 'application'

View File

@@ -14,8 +14,11 @@ public class Main {
private static final Logger logger = LoggerFactory.getLogger("Launcher"); private static final Logger logger = LoggerFactory.getLogger("Launcher");
public static void main(String[] args) { public static void main(String[] args) {
Core asysCore = new Core(); final Core asysCore = new Core();
asysCore.setConfiguration(getProperties()); asysCore.setConfiguration(getProperties());
Runtime.getRuntime().addShutdownHook(new Thread(asysCore::stop));
asysCore.start(); asysCore.start();
} }