发布时间:2024-07-01 13:01
{
if (!"mysql".equals(this.dbType) && !"mariadb".equals(this.dbType) && !"h2".equals(this.dbType) && !"presto".equals(this.dbType)) {
if (!"oracle".equals(this.dbType) && !"AliOracle".equals(this.dbType)) {
if (!"sqlserver".equals(this.dbType) && !"jtds".equals(this.dbType)) {
if (!"postgresql".equals(this.dbType) && !"edb".equals(this.dbType)) {
if (!"db2".equals(this.dbType)) {
throw new IllegalStateException("dbType not support : " + this.dbType + ", url " + dataSource.getUrl());
}
if (this.config == null) {
this.config = new WallConfig("META-INF/druid/wall/db2");
}
this.provider = new DB2WallProvider(this.config);
} else {
if (this.config == null) {
this.config = new WallConfig("META-INF/druid/wall/postgres");
}
this.provider = new PGWallProvider(this.config);
}
} else {
if (this.config == null) {
this.config = new WallConfig("META-INF/druid/wall/sqlserver");
}
this.provider = new SQLServerWallProvider(this.config);
}
} else {
if (this.config == null) {
this.config = new WallConfig("META-INF/druid/wall/oracle");
}
this.provider = new OracleWallProvider(this.config);
}
} else {
if (this.config == null) {
this.config = new WallConfig("META-INF/druid/wall/mysql");
}
this.provider = new MySqlWallProvider(this.config);
}
this.provider.setName(dataSource.getName());
this.inited = true;
}
}
filters: config,stat