阅读mybatis插件文档
This commit is contained in:
1
mybatis/mybatis-plus.md
Normal file
1
mybatis/mybatis-plus.md
Normal file
@@ -0,0 +1 @@
|
||||
# Mybatis Plus
|
||||
@@ -53,6 +53,7 @@
|
||||
- [通过Configuration来创建SqlSessionFactory](#通过configuration来创建sqlsessionfactory)
|
||||
- [SqlSessionFactory构建SqlSession实例](#sqlsessionfactory构建sqlsession实例)
|
||||
- [openSession参数](#opensession参数)
|
||||
- [插件](#插件)
|
||||
|
||||
# mybatis框架
|
||||
## Mybatis中主要的类及其生命周期
|
||||
@@ -1078,3 +1079,11 @@ SqlSession openSession(ExecutorType execType, Connection connection)
|
||||
> batch会将相关的sql语句分组到一个batch文件中,并且一次提交到database server端。
|
||||
> - addBatch方法会将单独的sql语句添加到batch中,而executeBatch方法会执行batch中所有被分组到一起的sql语句
|
||||
> executeBatch方法会返回一个Integer数组,数组中每一个元素代表每个update语句的update count
|
||||
|
||||
## 插件
|
||||
mybatis允许通过interceptor对mapped statement的执行进行拦截,mybatis支持拦截如下调用:
|
||||
- Executor(update, query, flushStatements, commit, rollback, getTransaction, close, isClosed)
|
||||
- ParameterHandler (getParameterObject, setParameters)
|
||||
- ResultSetHandler (handleResultSets, handleOutputParameters)
|
||||
- StatementHandler (prepare, parameterize, batch, update, query)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user