use of com.alibaba.druid.wall.WallFilter in project druid by alibaba.
the class DruidFilterConfiguration method wallFilter.
@Bean
@ConfigurationProperties(FILTER_WALL_PREFIX)
@ConditionalOnProperty(prefix = FILTER_WALL_PREFIX, name = "enabled")
@ConditionalOnMissingBean
public WallFilter wallFilter(WallConfig wallConfig) {
WallFilter filter = new WallFilter();
filter.setConfig(wallConfig);
return filter;
}
use of com.alibaba.druid.wall.WallFilter in project druid by alibaba.
the class WallFilterTest3 method setUp.
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setUrl("jdbc:h2:mem:wall_test;");
// dataSource.setFilters("wall");
dataSource.setDbType(JdbcConstants.MARIADB);
WallConfig config = new WallConfig();
config.setTenantCallBack(new TenantTestCallBack());
wallFilter = new WallFilter();
wallFilter.setConfig(config);
wallFilter.setDbType(JdbcConstants.MARIADB);
List<Filter> filters = new LinkedList<Filter>();
filters.add(wallFilter);
dataSource.setProxyFilters(filters);
dataSource.init();
}
use of com.alibaba.druid.wall.WallFilter in project druid by alibaba.
the class TestOracleWall3 method setUp.
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
WallFilter wall = new WallFilter();
wall.setConfig(new WallConfig());
wall.getConfig().setWrapAllow(true);
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriver());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setFilters("stat");
dataSource.getProxyFilters().add(wall);
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
use of com.alibaba.druid.wall.WallFilter in project druid by alibaba.
the class TestOracleWallJdbc3 method setUp.
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
WallFilter wall = new WallFilter();
wall.setConfig(new WallConfig());
wall.getConfig().setWrapAllow(true);
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriverJdbc3());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setFilters("stat");
dataSource.getProxyFilters().add(wall);
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
Aggregations