[ 
https://issues.apache.org/jira/browse/SCB-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500184#comment-16500184
 ] 

ASF GitHub Bot commented on SCB-636:
------------------------------------

jeho0815 commented on a change in pull request #745: [SCB-636] change config 
mapping machanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/745#discussion_r192733272
 
 

 ##########
 File path: 
foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigMapping.java
 ##########
 @@ -29,8 +36,20 @@
 
   static {
     ClassLoader loader = Thread.currentThread().getContextClassLoader();
-    InputStream is = loader.getResourceAsStream("mapping.yaml");
-    configMap = YAMLUtil.yaml2Properties(is);
+    List<URL> urlList = new ArrayList<>();
+    configMap = new HashMap<String, Object>();
+    Enumeration<URL> urls;
+    try {
+      urls = loader.getResources("mapping.yaml");
+      while (urls.hasMoreElements()) {
+        urlList.add(urls.nextElement());
+      }
+      for (URL url : urlList) {
+        configMap.putAll(YAMLUtil.yaml2Properties(url.openStream()));
+      }
+    } catch (IOException e) {
+      e.printStackTrace();
 
 Review comment:
   i'm sorry~, will change

----------------------------------------------------------------
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:
us...@infra.apache.org


> As a OM staff, i want to use the lb endpoint as the 
> servicecenter/configcenter address config
> ---------------------------------------------------------------------------------------------
>
>                 Key: SCB-636
>                 URL: https://issues.apache.org/jira/browse/SCB-636
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>            Reporter: jeho0815
>            Assignee: jeho0815
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> we want to deploy the servicecenter on PaaS platform and support a ELB to 
> access to sc/cc, so we can providor a adaptor to get the Endpoint to adapt 
> different Paas



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to