iBatis与Spring集成的批处理

 public String insertBatch(final List<PrizePool> prizePoolList) {
	getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
		public Object doInSqlMapClient(SqlMapExecutor executor)
						throws SQLException {
			executor.startBatch();
			executor.insert("insert_luck", prizePool);
			return executor.executeBatch();
		});
		return "";
	}

}

 

你可能感兴趣的:(spring,ibatis)