- 继承关系
RoutingStatementHandler会根据MappedStatement中StatementType属性进行创建StatementHandler
- RoutingStatementHandler中StatementHandler的类型
- 真正与数据库交互的StatementHandler
PreparedStatementHandler中执行数据库查询后把查询结果交给resultSetHandler进行处理
public <E> List<E> query(Statement statement, ResultHandler resultHandler) throws SQLException {
PreparedStatement ps = (PreparedStatement) statement;
ps.execute();
return resultSetHandler.<E> handleResultSets(ps);
}