Package tech.jhipster.config.h2
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.
-
-
Constructor Summary
Constructors Constructor Description H2ConfigurationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
createServer()
createServer.static Object
createServer(String port)
createServer.static void
initH2Console()
Init the H2 console via H2's webserver when no servletContextServletContext
is available.static void
initH2Console(javax.servlet.ServletContext servletContext)
initH2Console.
-
-
-
Method Detail
-
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
- aString
object.- Returns:
- a
Object
object. - Throws:
SQLException
- if any.
-
initH2Console
public static void initH2Console()
Init the H2 console via H2's webserver when no servletContextServletContext
is available.
-
initH2Console
public static void initH2Console(javax.servlet.ServletContext servletContext)
initH2Console.
- Parameters:
servletContext
- aServletContext
object.
-
-