Spring Boot — h2 inmemory console
4 min readJan 6, 2022
--
문제: console 로 inmemory h2 접근 하는 방법
해법: 어플리케이션 실행 시 H2 console available at ‘/h2’. Database available at ‘jdbc:h2:mem:3863ced4–4350–4618-bb46–5b9ba7f6782b’ 로그 확인하여 url 값으로 입력
2022-01-06 23:37:58.986 INFO 11489 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-01-06 23:37:58.995 INFO 11489 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-01-06 23:37:58.995 INFO 11489 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.37]
2022-01-06 23:37:59.040 INFO 11489 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-01-06 23:37:59.040 DEBUG 11489 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
2022-01-06 23:37:59.040 INFO 11489 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1458 ms
2022-01-06 23:37:59.076 INFO 11489 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-01-06 23:37:59.157 INFO 11489 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-01-06 23:37:59.162 INFO 11489 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2'. Database available at 'jdbc:h2:mem:3863ced4-4350-4618-bb46-5b9ba7f6782b'
설명: