Spring boot H2 DB 설정
Java/spring2022. 11. 10. 14:16Spring boot H2 DB 설정

Spring boot에서 DB를 무엇을 사용할까 고민하다 가장 간단한 방법인 H2 DB를 연동하였다. 우선 build.gradle에서 dependency를 설정해야 한다. dependency 설정 dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2databa..

image