@Intercepts(value=@Signature(type=org.apache.ibatis.executor.Executor.class,method="update",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class}))
public class SqlExplainInterceptor
extends Object
implements org.apache.ibatis.plugin.Interceptor
SQL 执行分析拦截器【 目前只支持 MYSQL-5.6.3 以上版本 】
| 构造器和说明 |
|---|
SqlExplainInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
intercept(org.apache.ibatis.plugin.Invocation invocation) |
boolean |
isStopProceed() |
Object |
plugin(Object target) |
void |
setProperties(Properties prop) |
void |
setStopProceed(boolean stopProceed) |
protected void |
sqlExplain(org.apache.ibatis.session.Configuration configuration,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.mapping.BoundSql boundSql,
Connection connection,
Object parameter)
判断是否执行 SQL
|
public Object intercept(org.apache.ibatis.plugin.Invocation invocation) throws Throwable
intercept 在接口中 org.apache.ibatis.plugin.InterceptorThrowableprotected void sqlExplain(org.apache.ibatis.session.Configuration configuration,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.mapping.BoundSql boundSql,
Connection connection,
Object parameter)
判断是否执行 SQL
configuration - mappedStatement - boundSql - connection - parameter - Exceptionpublic void setProperties(Properties prop)
setProperties 在接口中 org.apache.ibatis.plugin.Interceptorpublic boolean isStopProceed()
public void setStopProceed(boolean stopProceed)
Copyright © 2017. All rights reserved.