0coder
0coder

Reputation: 71

How do I enable h2 console in application.yml for SpringBoot?

I have an application.yml file where I want to enable h2-console but on searching over google I got results only for application.properties file. Can anyone help?

Upvotes: 4

Views: 9573

Answers (3)

Rishabh Agarwal
Rishabh Agarwal

Reputation: 2644

for properties and yml use the following (application.yml)

spring:
 h2:
    console:
      enabled: true

(application.properties)

   spring.h2.console.enabled = true

Upvotes: 2

Alexander Petrov
Alexander Petrov

Reputation: 991

you need to use this structure

###
#   H2 Settings
###
  h2:
    console:
      enabled: true
      path: /console
      settings:
        trace: false
        web-allow-others: false

Upvotes: 1

Related Questions