Class H2ConfigurationHelper

java.lang.Object
tech.jhipster.config.h2.H2ConfigurationHelper

public class H2ConfigurationHelper extends Object
Utility class to configure H2 in development.

We don't want to include H2 when we are packaging for the "prod" profile and won't actually need it, so we have to load / invoke things at runtime through reflection.

  • Method Details

    • createServer

      public static Object createServer() throws SQLException

      createServer.

      Returns:
      a Object object.
      Throws:
      SQLException - if any.
    • createServer

      public static Object createServer(String port) throws SQLException

      createServer.

      Parameters:
      port - a String object.
      Returns:
      a Object object.
      Throws:
      SQLException - if any.
    • initH2Console

      public static void initH2Console()
      Init the H2 console via H2's webserver when no servletContext ServletContext is available.
    • initH2Console

      public static void initH2Console(jakarta.servlet.ServletContext servletContext)

      initH2Console.

      Parameters:
      servletContext - a ServletContext object.