MyBatis 实际使用案例-plugins
生活随笔
收集整理的這篇文章主要介紹了
MyBatis 实际使用案例-plugins
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
插件是MyBatis 的一個很強大的機制,跟很多其他的框架一樣,MyBatis 預留了插件的接口,讓MyBatis 更容易擴展。
根據官方的定義,插件可以攔截這四個對象的這些方法,我們把這四個對象稱作MyBatis 的四大對象。我們會在帶大家閱讀源碼,知道了這4 大對象的作用之后,再來分析自定義插件的開發和插件運行的原理。
http://www.mybatis.org/mybatis-3/zh/configuration.html#plugins
| 類(或接口) | 方法 |
| Executor | update, query, flushStatements, commit, rollback, getTransaction, close, isClosed |
| ParameterHandler | getParameterObject, setParameters |
| ResultSetHandler | handleResultSets, handleOutputParameters |
| StatementHandler | prepare, parameterize, batch, update, query |
?
超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生總結
以上是生活随笔為你收集整理的MyBatis 实际使用案例-plugins的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MyBatis 实际使用案例-objec
- 下一篇: MyBatis 实际使用案例-envir