java.lang.Object
io.helidon.microprofile.server.Main

@Deprecated public final class Main extends Object
Deprecated.
since 2.0.0, use Main instead
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 Details

    • main

      public static void main(String[] args)
      Deprecated.
      Main method to start server. The server will collect JAX-RS application automatically (through CDI extension - just annotate it with ApplicationScoped).
      Parameters:
      args - command line arguments, currently ignored
    • serverPort

      @Deprecated public static int serverPort()
      Deprecated.
      use ServerCdiExtension to get the port
      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 through main(String[]) method. Otherwise use Server.port(). How to get the port in Helidon 2.0:
       port = CDI.current()
         .getBeanManager()
         .getExtension(ServerCdiExtension.class)
         .port();
       
      Returns:
      port the server started on