Basically the same question as Viewing the contents of an H2 or HSQLDB database in memory .
Just add the following to your configuration.
<bean id="h2Server" class="org.h2.tools.Server" factory-method="createTcpServer" init-method="start" destroy-method="stop" depends-on="h2WebServer"> <constructor-arg value="-tcp,-tcpAllowOthers,-tcpPort,9092"/> </bean> <bean id="h2WebServer" class="org.h2.tools.Server" factory-method="createWebServer" init-method="start" destroy-method="stop"> <constructor-arg value="-web,-webAllowOthers,-webPort,8082"/> </bean>
This will launch both the H2 web console and the TCP server in the same JVM as your embedded database so that you can access port 8082 with your web browser (enter jdbc: h2: mem: dataSource as the URL address) or access port 9092 with an external SQL client, such as SQuirreLSQL, and view the same data.
hshib Nov 13 '13 at 18:29 2013-11-13 18:29
source share