@Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="query",args={java.sql.Statement.class,org.apache.ibatis.session.ResultHandler.class}) @Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="update",args=java.sql.Statement.class) @Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="batch",args=java.sql.Statement.class)
public class PerformanceInterceptor
extends java.lang.Object
implements org.apache.ibatis.plugin.Interceptor
性能分析拦截器,用于输出每条 SQL 语句及其执行时间
| 构造器和说明 |
|---|
PerformanceInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.reflect.Method |
getMethodRegular(java.lang.Class<?> clazz,
java.lang.String methodName)
获取此方法名的具体 Method
|
java.lang.Object |
intercept(org.apache.ibatis.plugin.Invocation invocation) |
java.lang.Object |
plugin(java.lang.Object target) |
void |
setProperties(java.util.Properties prop) |
public java.lang.Object intercept(org.apache.ibatis.plugin.Invocation invocation)
throws java.lang.Throwable
intercept 在接口中 org.apache.ibatis.plugin.Interceptorjava.lang.Throwablepublic java.lang.Object plugin(java.lang.Object target)
plugin 在接口中 org.apache.ibatis.plugin.Interceptorpublic void setProperties(java.util.Properties prop)
setProperties 在接口中 org.apache.ibatis.plugin.Interceptorpublic java.lang.reflect.Method getMethodRegular(java.lang.Class<?> clazz,
java.lang.String methodName)
clazz - class 对象methodName - 方法名