Package tech.jhipster.config.h2
Class H2ConfigurationHelper
java.lang.Object
tech.jhipster.config.h2.H2ConfigurationHelper
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcreateServer.static ObjectcreateServer(String port) createServer.static voidInit the H2 console via H2's webserver when no servletContextServletContextis available.static voidinitH2Console(jakarta.servlet.ServletContext servletContext) initH2Console.
-
Constructor Details
-
H2ConfigurationHelper
public H2ConfigurationHelper()
-
-
Method Details
-
createServer
createServer.
- Returns:
- a
Objectobject. - Throws:
SQLException- if any.
-
createServer
createServer.
- Parameters:
port- aStringobject.- Returns:
- a
Objectobject. - Throws:
SQLException- if any.
-
initH2Console
public static void initH2Console()Init the H2 console via H2's webserver when no servletContextServletContextis available. -
initH2Console
public static void initH2Console(jakarta.servlet.ServletContext servletContext) initH2Console.
- Parameters:
servletContext- aServletContextobject.
-