YOONJI
article thumbnail
[Spring Intro] Section 06. 스프링 DB 접근 기술_순수 JDBC, 스프링 통합 테스트, 스프링 JDBC Template
🖋️ study/spring 2023. 1. 30. 04:40

순수 JDBC 환경 설정 # build.gradle 파일에 jdbc, h2 데이터베이스 관련 라이브러리 추가 // DB와 연동하기 위해 필요한 드라이버 implementation 'org.springframework.boot:spring-boot-starter-jdbc' // DB와 붙을 때 필요한 데이터베이스가 제공하는 클라이언트 runtimeOnly 'com.h2database:h2' # 스프링 부트 데이터베이스 연결 설정 추가 resources/application.properties spring.datasource.url=jdbc:h2:tcp://localhost/~/test spring.datasource.driver-class-name=org.h2.Driver spring.datasource...