public class SqlMapAccountDao extends SqlMapClientDaoSupport implements AccountDao { ... public void insertAccount(Account account) throws DataAccessException { getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { executor.startBatch(); executor.update("insertAccount", account); executor.update("insertAddress", account.getAddress()); executor.executeBatch(); } }); } }
ibatis中实现批量操作
最新推荐文章于 2017-06-22 14:38:18 发布