首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

[Relearn Spring] 五 Jdbc Support

2012-10-13 
[Relearn Spring] 5 Jdbc Support1. JdbcTemplate is thread-safe. So a single instance of JdbcTemplate

[Relearn Spring] 5 Jdbc Support
1. JdbcTemplate is thread-safe. So a single instance of JdbcTemplate will be enough for the whole system, unless you have more than one data sources.

2. NamedParameterJdbcTemplate

  String sql = "select * from t where t.firstName = :firstName "

  You can then provider with a map --
 map.put("firstName", "xxx") 

  or a java bean  --
bean.setFirstName("xxx")

热点排行