title: H2 console is not opening in Spring boot app when the application is started from IntelliJ
body: <p>I am using Spring boot version 2.1.3.RELEASE in my gradle based spring boot project. 
  I added the following dependencies in my build.gradle file:</p>
  
  <pre><code>dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-web'
      implementation 'org.springframework.boot:spring-boot-starter-actuator'
      implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
      implementation 'com.h2database:h2'
  }
  </code></pre>
  
  <p>I added the following in the application.properties file:</p>
  
  <pre><code>spring.h2.console.enabled=true
  spring.h2.console.path=/h2
  </code></pre>
  
  <p>But when I start the application by running the main class from IntelliJ and access the h2 console link (<a href="http://localhost:8080/h2" rel="nofollow noreferrer">http://localhost:8080/h2</a>) I get the following :</p>
  
  <pre><code>Whitelabel Error Page
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Fri Apr 05 09:00:24 PDT 2019
  There was an unexpected error (type=Not Found, status=404).
  No message available
  </code></pre>
  
  <p>But when I started the app from command line using <code>./gradlew bootRun</code>, then the h2 console is loading fine.</p>
  
  <p>Do you have any idea?</p>