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