liubao68 commented on a change in pull request #1789: URL: https://github.com/apache/servicecomb-java-chassis/pull/1789#discussion_r431674257
########## File path: service-registry/registry-local/src/main/java/org/apache/servicecomb/localregistry/LocalRegistryStore.java ########## @@ -83,9 +90,28 @@ public void run() { selfMicroserviceInstance.setInstanceId(selfMicroservice.getServiceId()); selfMicroserviceInstance.setServiceId(selfMicroservice.getServiceId()); - InputStream is = this.getClass().getClassLoader().getResourceAsStream(REGISTRY_FILE_NAME); - if (is != null) { - initFromData(is); + InputStream is = null; + + try { + ClassLoader loader = JvmUtils.findClassLoader(); Review comment: I see many ohter places code like this. 'ResourceUtil#findResourcesBySuffix' returns `List<URI>` and not convinient for open stream. ---------------------------------------------------------------- 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: us...@infra.apache.org