Skip to content

Commit

Permalink
Merge pull request #76 from daniel-beck/fix-resources
Browse files Browse the repository at this point in the history
Fix webapp resource lookup
  • Loading branch information
Zhao Xiaojie committed May 10, 2019
2 parents a6a3f53 + 2da0d1f commit db1a37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion pom.xml
Expand Up @@ -146,7 +146,6 @@
</resource>
<resource>
<directory>core/src/main/webapp</directory>
<targetPath>webapp</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
Expand Down
Expand Up @@ -13,12 +13,15 @@ public class LocalizationContributorImpl extends LocalizationContributor {
@CheckForNull
@Override
public URL getResource(@Nonnull String s) {
if (s.startsWith("/")) {
s = s.substring(1);
}
return getClass().getClassLoader().getResource(s);
}

@CheckForNull
@Override
public URL getPluginResource(@Nonnull String s, @Nonnull PluginWrapper pluginWrapper) {
return getClass().getClassLoader().getResource("/webapp/" + s);
return getClass().getClassLoader().getResource("webapp/" + s);
}
}

0 comments on commit db1a37c

Please sign in to comment.