목록jdbc (1)
주뇽's 저장소
[Java Spring] JDBC, Spring JDBC, JPA, Spring JPA
JDBC와 Spring JDBC를 이용한 코드 비교 - JDBC(Delete) public void deleteTodo(int id){ PrepareStatement st = null; try{ st = db.conn.prepareStatement("delete from todo where id=?"); st.setInt(1, id); st.execute(); } catch (SQLException e){ logger.fatal("Query Failed :, e"); } finaaly { if (st != null){ try{st.close();} catch (SQLException e){} } } } - Spring JDBC(Delete) public void deleteTodo(int id){ jdb..
웹개발/SpringBoot
2023. 11. 24. 17:48