mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve WallFilter
This commit is contained in:
@@ -20,11 +20,16 @@ public class WallContext {
|
||||
private final static ThreadLocal<WallContext> contextLocal = new ThreadLocal<WallContext>();
|
||||
|
||||
private WallSqlStat sqlState;
|
||||
private final String dbType;
|
||||
|
||||
public static WallContext createIfNotExists() {
|
||||
public WallContext(String dbType){
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
public static WallContext createIfNotExists(String dbType) {
|
||||
WallContext context = contextLocal.get();
|
||||
if (context == null) {
|
||||
context = new WallContext();
|
||||
context = new WallContext(dbType);
|
||||
contextLocal.set(context);
|
||||
}
|
||||
return context;
|
||||
@@ -46,4 +51,8 @@ public class WallContext {
|
||||
this.sqlState = sqlState;
|
||||
}
|
||||
|
||||
public String getDbType() {
|
||||
return dbType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user