未验证 提交 7bcc3271 编写于 作者: ShardingSphere's avatar ShardingSphere 提交者: GitHub

Merge pull request #811 from tuohai666/dev

for chinese file path in proxy
此差异已折叠。
......@@ -30,6 +30,7 @@ import lombok.Getter;
import javax.sql.DataSource;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.sql.SQLException;
import java.util.Collections;
import java.util.HashMap;
......@@ -54,8 +55,8 @@ public final class ShardingRuleRegistry {
private ShardingRuleRegistry() {
YamlShardingConfigurationForProxy yamlShardingConfigurationForProxy;
try {
yamlShardingConfigurationForProxy = YamlShardingConfigurationForProxy.unmarshal(new File(getClass().getResource("/conf/sharding-config.yaml").getFile()));
} catch (final IOException ex) {
yamlShardingConfigurationForProxy = YamlShardingConfigurationForProxy.unmarshal(new File(getClass().getResource("/conf/sharding-config.yaml").toURI().getPath()));
} catch (final IOException | URISyntaxException ex) {
throw new ShardingJdbcException(ex);
}
dataSourceMap = new HashMap<>(128, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册