title: Spring Boot default H2 jdbc connection (and H2 console)
body: <p>I am simply trying to see the H2 database content for an embedded H2 database which spring-boot creates when I don't specify anything in my <code>application.properties</code> and start with mvn spring:run. I can see hibernate JPA creating the tables but if I try to access the h2 console at the URL below the database has no tables.</p>
  <pre class="lang-none prettyprint-override"><code>http://localhost:8080/console/
  </code></pre>
  <p>I see suggestions like this one:
  <a href="https://stackoverflow.com/questions/17803718/view-content-of-embedded-h2-database-started-by-spring">View content of embedded H2 database started by Spring</a></p>
  <p>But I don't know where to put the suggested XML in spring-boot and even if I did, I don't want the <code>h2console</code> to be available anymore when an external database is configured so it is more likely that I need to handle this with some kind of conditional code (or maybe just allow spring to automatically handle it in the most ideal case where I only include H2 when a maven profile is activated).</p>
  <p>Does anyone have some sample code showing how to get the H2 console working in boot (and also the way to find out what the jdbc connection string that spring is using is)?</p>