Ibatis批量操作,代码模板如下: /* (non-Javadoc) * @see com.normandy.position.dao.NorTradeDAO#batchUpdateOrderList(java.util.List) */ public void batchUpdateOrderList(final List<NorTradeDO> list) { if(null == list || 0 == list.size()){ throw new IllegalArgumentException("can not batch update with null list."); } getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecutor sme) throws SQLException { sme.startBatch(); for(NorTradeDO norTradeDO : list){ sme.update("TRADE-NOR-UPDATE", norTradeDO); } sme.executeBatch(); return null; } }); }