스프링 데이터베이스 연동

· Spring
JDBC 프로그래밍의 단점을 보완하는 스프링 JDBC API를 이용하면 DB 연동에 필요한 Connection을 구한 다음 쿼리를 실행하기 위한 PreparedStatement를 생성합니다. 그리고 쿼리를 실행한 뒤에는 finally 블록에서 ResultSet, PreparedStatement, Connection을 닫습니다. JDBC API를 이용한 DB 연동 코드 구조 Member member; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = DriverManager.getConnection("jdbc:mysql://localhost/spring5fs", "spring5", "spring5..
runnnerDevHong
'스프링 데이터베이스 연동' 태그의 글 목록