Package io.helidon.microprofile.server
Class Main
- java.lang.Object
-
- io.helidon.microprofile.server.Main
-
public final class Main extends Object
Start a Helidon microprofile server that collects JAX-RS resources from configuration or from classpath.Uses
logging.properties
to configure Java logging unless a configuration is defined through a Java system property. The file is expected either in the directory the application was started, or on the classpath.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Main method to start server.static int
serverPort()
Once the server is started (e.g.
-
-
-
Method Detail
-
main
public static void main(String[] args)
Main method to start server. The server will collection JAX-RS application automatically (through CDI extension - just annotate it withApplicationScoped
).- Parameters:
args
- command line arguments, currently ignored
-
serverPort
public static int serverPort()
Once the server is started (e.g. the main method finished), the server port can be obtained with this method. This method will return a reasonable value only if the server is started throughmain(String[])
method. Otherwise useServer.port()
.- Returns:
- port the server started on
-
-