You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/16 09:29:35 UTC

[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #6361: support absolute path for conf dir

xbkaishui commented on a change in pull request #6361:
URL: https://github.com/apache/shardingsphere/pull/6361#discussion_r455651539



##########
File path: shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ShardingConfigurationLoader.java
##########
@@ -54,8 +53,8 @@
      */
     public ShardingConfiguration load(final String path) throws IOException {
         Collection<String> schemaNames = new HashSet<>();
-        YamlProxyServerConfiguration serverConfig = loadServerConfiguration(getResourceFile(path + "/" + SERVER_CONFIG_FILE));
-        File configPath = getResourceFile(path);

Review comment:
       why remove this, the bug is caused by script, this is usable when run the proxy in idea and load the absolute path 

##########
File path: shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ShardingConfigurationLoader.java
##########
@@ -69,14 +68,6 @@ public ShardingConfiguration load(final String path) throws IOException {
         return new ShardingConfiguration(serverConfig, ruleConfigurationMap);
     }
     
-    private File getResourceFile(final String path) {
-        URL url = ShardingConfigurationLoader.class.getResource(path);

Review comment:
       this is compatibility with orginal classloader logic 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org