Configuration的newStatementHandler分析

SimpleExecutor的doUpdate方法上文有分析過:

電腦培訓,計算機培訓,平面設計培訓,網(wǎng)頁設計培訓,美工培訓,Web培訓,Web前端開發(fā)培訓

 1 public int doUpdate(MappedStatement ms, Object parameter) throws SQLException { 2     Statement stmt = null; 3     try { 4       Configuration configuration = ms.getConfiguration(); 5       StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, RowBounds.DEFAULT, null, null); 6       stmt = prepareStatement(handler, ms.getStatementLog()); 7       return handler.update(stmt); 8     } finally { 9       closeStatement(stmt);10     }11 }

電腦培訓,計算機培訓,平面設計培訓,網(wǎng)頁設計培訓,美工培訓,Web培訓,Web前端開發(fā)培訓

這兩天重看第5行的newStatementHandler方法的時候,發(fā)現(xiàn)方法上文在這個方法中分析地太簡略了,這里過一遍一下Configuration的newStatementHandler方法,方法的實現(xiàn)為:

網(wǎng)友評論