Skip to content

Instantly share code, notes, and snippets.

@Cartmanishere
Created May 1, 2021 07:37
Show Gist options
  • Save Cartmanishere/cf971e0512075e1cafa18690fb6f2994 to your computer and use it in GitHub Desktop.
Save Cartmanishere/cf971e0512075e1cafa18690fb6f2994 to your computer and use it in GitHub Desktop.
public class HTTPTemplateLoader extends URLTemplateLoader {
public HTTPTemplateLoader(String baseUrl) {
setPrefix(normalize(baseUrl));
}
public String resolve(final String filename) {
return getPrefix() + filename + getSuffix();
}
protected URL getResource(String location) throws IOException {
return new URL(location);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment