int port = 8080;
String portPrefix = "--server.port=";
for (String arg : args) {
if (arg.startsWith(portPrefix)) {
port = Integer.parseInt(arg.substring(portPrefix.length()));
}
}
SpringApplication.run(AppRegisterApplication.class, args);
try {
Runtime.getRuntime().exec("cmd /c start https://localhost:" + port);
} catch (IOException e) {
e.printStackTrace();
}int port = 8080;
String portPrefix = "--server.