\nimport org.h2.server.web.WebServlet;\nimport org.springframework.boot.context.embedded.ServletRegistrationBean;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;<\/pre>\n@Configuration\npublic class H2ConsoleWebConfiguration {\n @Bean\n ServletRegistrationBean h2servletRegistration() {\n ServletRegistrationBean registrationBean = new ServletRegistrationBean(new WebServlet());\n registrationBean.addUrlMappings(\"\/console\/*\");\n return registrationBean;\n }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"To get an\u00a0H2 Database Web Console accessing an in-memory database running on Spring Boot: Register\u00a0H2’s WebServlet (with UrlMapping \/console\/*) to your Spring project in a Configuration annotated class. Restart your Application. Open a web page to\u00a0http:\/\/localhost:8080\/console\/ Be sure you’re accessing the correct database JDBC URL (default would be\u00a0jdbc:h2:mem:testdb) (Credit: Spring Framework Guru) import org.h2.server.web.WebServlet; […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,248],"tags":[247],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/496"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}