title: How to connect H2 console to embedded Spring H2 DB
body: <p>Ok, Im developing simple app, which has Spring Ebedded H2 database for development. database.xml bean conf looks like this: </p>
  
  <pre><code>&lt;bean id="h2Server" class="org.h2.tools.Server" factory-method="createTcpServer"
          init-method="start" destroy-method="stop" depends-on="h2WebServer"&gt;
          &lt;constructor-arg value="-tcp,-tcpAllowOthers,-tcpPort,9092" /&gt;
      &lt;/bean&gt;
      &lt;bean id="h2WebServer" class="org.h2.tools.Server" factory-method="createWebServer"
          init-method="start" destroy-method="stop"&gt;
          &lt;constructor-arg value="-web,-webAllowOthers,-webPort,8082" /&gt;
      &lt;/bean&gt;
  
      &lt;jdbc:embedded-database id="dataSource" type="H2" /&gt;
  </code></pre>
  
  <p>H2 database is initializing, My app is working, Im creating entities, and they are stored in H2 db when Tomcat is launched (I know it because I use and retrieve them). However, when I look at H2 console, my Entity tables are not present.</p>
  
  <p>I guess H2 console points on another H2 database, and Spring Embedded H2 Db is not related with that H2 console.</p>
  
  <p>How to fix that? </p>
  
  <p>EDIT: Im getting access to H2 console by typing <strong><a href="http://localhost:8082" rel="nofollow">http://localhost:8082</a></strong> in my web browser. </p>