๐Ÿ’ Spring/Spring in Action

๐Ÿ’ Spring/Spring in Action

Jdbc, JdbcTemplate, Spring Data Jpa์— ๋Œ€ํ•ด์„œ

Goal ์Šคํ”„๋ง JdbcTemplate ์‚ฌ์šฉํ•ด๋ณด๊ธฐ SimpleJdbcInsert๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•ด๋ณด๊ธฐ ์Šคํ”„๋ง ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์„œ JPA ์„ ์–ธํ•˜๊ณ  ์‚ฌ์šฉํ•ด๋ณด๊ธฐ ์ˆœ์ˆ˜ JDBC Jdbc๋ž€, Java DataBase Connectivity, ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์—ฐ๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ API์ด๋‹ค. Jdbc๋ฅผ ์ด์šฉํ•ด select ์ฟผ๋ฆฌ ์ž‘์„ฑํ•ด๋ณด๋ฉด ์•„๋ž˜์™€ ๊ฐ™๋‹ค. @Override public Account findById(String id) { Connection conn = null; PreparedStatement st = null; ResultSet rs = null; String sql = "select id, name from Account where id = ?"; try { conn = datasource.getCo..

iseunghan
'๐Ÿ’ Spring/Spring in Action' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก