use of com.dangdang.ddframe.rdb.integrate.fixture.NoneKeyModuloDatabaseShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class AbstractRoutingDatabaseOnlyTest method initDataSource.
protected ShardingDataSource initDataSource() {
DataSourceRule dataSourceRule = new DataSourceRule(createDataSourceMap("dataSource_%s"));
ShardingRule shardingRule = ShardingRule.builder().dataSourceRule(dataSourceRule).databaseShardingStrategy(new DatabaseShardingStrategy(new NoneKeyModuloDatabaseShardingAlgorithm())).build();
return new ShardingDataSource(shardingRule);
}
Aggregations