You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/01/11 10:20:08 UTC

[GitHub] MabinGo commented on a change in pull request #1058: [SCB-1109] local-service-registry sample of java-chassis can not run directly

MabinGo commented on a change in pull request #1058: [SCB-1109] local-service-registry sample of java-chassis can not run directly
URL: https://github.com/apache/servicecomb-java-chassis/pull/1058#discussion_r247065577
 
 

 ##########
 File path: samples/local-service-registry/local-registry-client/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryclient/LocalRegistryClient.java
 ##########
 @@ -30,10 +30,14 @@
   private static RestTemplate templateNew = RestTemplateBuilder.create();
 
   public static void main(String[] args) throws Exception {
-    System.setProperty("local.registry.file", "src/main/resources/registry.yaml");
+    String absoluteFilePath = Class.class.getClass().getResource("/").getPath() + "registry.yaml";
 
 Review comment:
   change to use classloader to get absolute path

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services