use of io.shardingjdbc.core.fixture.OrderDatabaseHintShardingAlgorithm in project sharding-jdbc by shardingjdbc.
the class DatabaseTest method setRouteRuleContext.
@Before
public void setRouteRuleContext() {
ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new HintShardingStrategyConfiguration(new OrderDatabaseHintShardingAlgorithm()));
dataSourceMap = new LinkedHashMap<>(2, 1);
dataSourceMap.put("ds_0", null);
dataSourceMap.put("ds_1", null);
shardingRule = new ShardingRule(shardingRuleConfig, dataSourceMap.keySet());
}
Aggregations