Hi Adrian,
Yes to both. NamedParameterJdbcTemplate is remaining and should be used for named parameter use.
If you don't want to create two templates you can always call getJdbcOperations() on the NamedParameterJdbcTemplate to get access to the regular JdbcOperations interface of the JdbcTemplate.
The SimpleJdbcTemplate was initially added to provide some Java 5 syntax sugar and we later added the named parameter support. There really is no need for three different template implementations any longer.
So, use the JdbcTemplate unless you need the named parameter support in which case you should use the NamedParameterJdbcTemplate.
-Thomas
--
Google 그룹스 'Korea Spring User Group' 그룹에 가입했으므로 본 메일이 전송되었습니다.
이 그룹에 게시하려면 ks...@googlegroups.com(으)로 이메일을 보내세요.
그룹에서 탈퇴하려면 ksug+uns...@googlegroups.com로 이메일을 보내주세요.
더 많은 옵션을 보려면 http://groups.google.com/group/ksug?hl=ko에서 그룹을 방문하세요.
On 7월13일, 오후6시28분, Hyunsok Oh <ensha...@gmail.com> wrote:
> 토비님 책을 보다 보니, SimpleJdbcTemplate를 더 많이 쓴다고 하던데,
> 스프링 3.1버전 자바독을 보니, SimpleJdbcTemplate 는 deprecated라고 나오네요.
>
> 다시 * JdbcTemplate과 NamedParameterJdbcTemplate 으로 돌아가게 된 이유가 뭘까요?*
> *뒤져보고 비교해보면 되겠지만, 혹시 잘 알고 계시는 분 있으시면 알려주시면 감사하겠습니다.*
> **