Skip to content

Conversation

wujimin
Copy link
Contributor

@wujimin wujimin commented Jun 27, 2017

if a microservice.yaml path is : file:/....../target/classes/microservice.yaml
then root path is : ....../target/classes
if a class (io.servicecomb.demo.jaxrs.server.ComputeImpl) is in file:/....../target/classes/io/servicecomb/demo/jaxrs/server/
then root path is : ....../target/classes
when resource is in a jar, then the root is the jar path.
file:/....../repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar!/org/apache/commons/lang/
root path is : ....../repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 82.026% when pulling 2265c6f on wujimin:find-resource-root into 9085931 on ServiceComb:master.

// if (resourceName != null) {
// configModel.setRootPath(FileUtils.findRootPath(url, resourceName));
// }
if (resourceName != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the resourceName is null , it's better to throw the exception here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resourceName is null when load additional config.
it's normal, not a exception

@WillemJiang WillemJiang merged commit ae6ed96 into apache:master Jun 27, 2017
@wujimin wujimin deleted the find-resource-root branch June 28, 2017 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants