jdbc
-
관계형 데이터베이스와 ORM (스프링 데이터 JPA - 1)Programming/Spring Data JPA 2020. 4. 30. 18:26
1. JDBC - 관계형 데이터베이스와 자바의 연결 고리 - 기본적으로 자바 안에 들어있어서, 각 디비에 맞는 드라이버만 추가하면 됨 - 아래는 postgreSQL 드라이버를 의존성에 추가한 부분 org.postgresql postgresql 42.2.10 - 도커를 사용하여 디비 실행 (스프링 부트 포스팅 참고) - URL 정보, 인증 정보가 필요함 public class Application { public static void main(String[] args) throws SQLException { String url = "jdbc:postgresql://localhost:5432/springdata"; String username = "hongchan"; String password = "pas..