public class DebugInterceptor extends Object implements Interceptor
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
defaultQueryMethod |
protected static String |
lambdaQueryName |
protected static String |
mapperName |
protected static String |
queryClassName |
protected static String |
sqlManager |
| 构造器和说明 |
|---|
DebugInterceptor() |
DebugInterceptor(String preferredShowClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
after(InterceptorContext ctx)
如果正常执行,调用after
|
void |
before(InterceptorContext ctx)
在查询前执行
|
protected void |
error(String str) |
void |
exception(InterceptorContext ctx,
Exception ex)
如果异常,将调用exception
|
protected List<String> |
formatParas(List<SQLParameter> list) |
static String |
formatSql(String sql) |
protected String |
formatSqlId(ExecuteContext executeContext) |
protected String |
getSqlId(String sqlId) |
protected String |
getTraceClassName()
如果自己封装了beetlsql 有自己的util,并不想打印util类,而是业务类,可以在这里写util类
|
protected boolean |
isDebugEnable(SqlId sqlId) |
protected boolean |
isSimple(SqlId sqlId) |
protected int |
lookBusinessCodeInTrace(StackTraceElement[] traces) |
protected void |
println(String str) |
protected void |
simpleOut(InterceptorContext ctx) |
protected void |
simpleOutException(InterceptorContext ctx,
Exception ex) |
protected static String mapperName
protected static String sqlManager
protected static String queryClassName
protected static String lambdaQueryName
protected static String defaultQueryMethod
public DebugInterceptor()
public DebugInterceptor(String preferredShowClass)
public void before(InterceptorContext ctx)
Interceptorbefore 在接口中 Interceptorprotected String formatSqlId(ExecuteContext executeContext)
protected int lookBusinessCodeInTrace(StackTraceElement[] traces)
protected String getTraceClassName()
public void after(InterceptorContext ctx)
Interceptorafter 在接口中 Interceptorprotected boolean isDebugEnable(SqlId sqlId)
protected List<String> formatParas(List<SQLParameter> list)
protected void println(String str)
protected void error(String str)
public void exception(InterceptorContext ctx, Exception ex)
Interceptorexception 在接口中 Interceptorprotected boolean isSimple(SqlId sqlId)
protected void simpleOut(InterceptorContext ctx)
protected void simpleOutException(InterceptorContext ctx, Exception ex)
Copyright © 2021. All rights reserved.