title: How To enable h2 console in java ee application
body: <p>I would like to have access to h2 console feature during development of my app. I am using JavaEE and wildfly as my application server.</p>
  
  <p>I know that for spring boot we need to add follwing lines of configuration:</p>
  
  <pre><code>spring.h2.console.enabled=true
  
  spring.h2.console.path=/h2
  </code></pre>
  
  <p>and than we have console at <code>http://localhost:8080/h2/</code></p>
  
  <p>But what about javaEE? How Can I access it?
  My pom has followin dependency to h2:</p>
  
  <pre><code>&lt;dependency&gt;
     &lt;groupId&gt;com.h2database&lt;/groupId&gt;
     &lt;artifactId&gt;h2&lt;/artifactId&gt;
     &lt;version&gt;1.4.196&lt;/version&gt;
     &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and persistance.xml:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;property name="eclipselink.logging.level" value="INFO"/&gt;
      &lt;property name="eclipselink.logging.parameters" value="true"/&gt;
  
      &lt;property name="hibernate.show_sql" value="true" /&gt;
      &lt;property name="javax.persistence.schema-generation.database.action" value="create"/&gt;
      &lt;property name="javax.persistence.sql-load-script-source" value="META-INF/initial.sql"/&gt;
  &lt;/properties&gt;
  </code></pre>