io.polyglotted.applauncher.server.Main Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of app-launcher Show documentation
Show all versions of app-launcher Show documentation
Launch an in-process application
The newest version!
package io.polyglotted.applauncher.server;
import lombok.SneakyThrows;
public abstract class Main {
public static final String SERVER_CLASS = "applauncher.server.class";
@SneakyThrows
public static void main(String[] args) {
String serverClazz = System.getProperty(SERVER_CLASS, SpringServer.class.getCanonicalName());
main((Server) Class.forName(serverClazz).newInstance());
}
public static void main(Server server) {
Runtime.getRuntime().addShutdownHook(new ServerShutdownHook(server));
server.start();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy