Skip to content

Commit

Permalink
recover proxy config
Browse files Browse the repository at this point in the history
  • Loading branch information
tuohai666 committed May 3, 2018
1 parent f1e0b20 commit ceb74de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@Setter
public class YamlShardingConfigurationForProxy {

private Map<String, DataSourceParameter> dataSourceParameters = new HashMap<>();
private Map<String, DataSourceParameter> dataSources = new HashMap<>();

private YamlShardingRuleConfiguration shardingRule;

Expand Down Expand Up @@ -82,6 +82,6 @@ public static YamlShardingConfigurationForProxy unmarshal(final byte[] yamlBytes
* @return sharding rule from yaml
*/
public ShardingRule getShardingRule(final Collection<String> dataSourceNames) {
return new ShardingRule(shardingRule.getShardingRuleConfiguration(), dataSourceNames.isEmpty() ? dataSourceParameters.keySet() : dataSourceNames);
return new ShardingRule(shardingRule.getShardingRuleConfiguration(), dataSourceNames.isEmpty() ? dataSources.keySet() : dataSourceNames);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private ShardingRuleRegistry() {
throw new ShardingJdbcException(ex);
}
dataSourceMap = new HashMap<>(128, 1);
Map<String, DataSourceParameter> dataSourceParameters = yamlShardingConfigurationForProxy.getDataSourceParameters();
Map<String, DataSourceParameter> dataSourceParameters = yamlShardingConfigurationForProxy.getDataSources();
for (String each : dataSourceParameters.keySet()) {
dataSourceMap.put(each, getDataSource(dataSourceParameters.get(each)));
}
Expand Down

0 comments on commit ceb74de

Please sign in to comment.