0

изменение способа запуска

This commit is contained in:
2018-09-23 14:17:28 +03:00
parent ed3bce0806
commit 2f3b3a4262
2 changed files with 36 additions and 7 deletions

View File

@@ -84,13 +84,8 @@ public class WebApp {
* @param args параметры запуска
*/
public static void main(String[] args) {
String host = "127.0.0.1";
int port = 8080;
if (args.length == 2) {
host = args[0];
port = Integer.parseInt(args[1]);
}
final String host = System.getProperty("host", "127.0.0.1");
final int port = Integer.parseInt(System.getProperty("port", "8080"));
log.info("Web app listen: {}:{}", host, port);
WebApp app = new WebApp(host, port);