Mybatis----插件

插件工作模式

  • 责任链模式和动态代理

四大接口

  • Executor (update, query, flushStatements, commit, rollback,getTransaction, close, isClosed) 拦截执行器的方法;
  • ParameterHandler (getParameterObject, setParameters) 拦截参数的处理;比如where id=?,进行?的替换。
  • ResultSetHandler (handleResultSets, handleOutputParameters) 拦截结果集的处理;
  • StatementHandler (prepare, parameterize, batch, update, query) 拦截Sql语法构建的处理;

                                               

https://blog.csdn.net/weixin_44046437/article/details/100526643

https://www.cnblogs.com/chenpi/p/10498921.html#_label1

原文地址:https://www.cnblogs.com/yanxiaoge/p/13706582.html