From 0b4f4773d02508a9b4e3de57c41e263186b7a513 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Thu, 10 Sep 2020 14:39:23 +0300 Subject: [PATCH] Init SQL support Signed-off-by: Pekka Helenius --- bookstore/pom.xml | 11 +++++++++++ bookstore/src/main/resources/application.properties | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/bookstore/pom.xml b/bookstore/pom.xml index 49ea1ed..f807e8a 100644 --- a/bookstore/pom.xml +++ b/bookstore/pom.xml @@ -41,6 +41,17 @@ spring-boot-starter-test test + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + com.h2database + h2 + + diff --git a/bookstore/src/main/resources/application.properties b/bookstore/src/main/resources/application.properties index cc31876..63a5547 100644 --- a/bookstore/src/main/resources/application.properties +++ b/bookstore/src/main/resources/application.properties @@ -3,6 +3,12 @@ # server.port=8080 +spring.h2.console.enabled=true +spring.h2.console.path=/h2-console +spring.datasource.url=jdbc:h2:mem:testdb + +spring.jpa.show-sql=true + # Ref: https://docs.spring.io/spring-boot/docs/1.2.0.M2/reference/html/common-application-properties.html # # EMBEDDED SERVER CONFIGURATION (ServerProperties)