X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FDefaultLoaders.java;h=72d8d190137fc67539e2f848262f63970ef58f25;hb=9b102d5ff09775e3867ad8709f22baf0ad608d30;hp=4978d7ce011f24c6689164dcdcfa0f9f1527c53c;hpb=70d761ab3aeba06a3acfd0a8bccdde49a5d8b9b4;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java b/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
index 4978d7c..72d8d19 100644
--- a/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
+++ b/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
@@ -7,16 +7,17 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
+import net.pterodactylus.sone.web.WebInterface;
import net.pterodactylus.util.io.Closer;
+import net.pterodactylus.util.template.ClassPathTemplateProvider;
import net.pterodactylus.util.template.Template;
+import net.pterodactylus.util.template.TemplateProvider;
import net.pterodactylus.util.web.Page;
import net.pterodactylus.util.web.Request;
import net.pterodactylus.util.web.StaticPage;
/**
* Default {@link Loaders} implementation that loads resources from the classpath.
- *
- * @author David âBombeâ Roden
*/
public class DefaultLoaders implements Loaders {
@@ -38,7 +39,13 @@ public class DefaultLoaders implements Loaders {
@Override
public Page loadStaticPage(String pathPrefix, String basePath, String mimeType) {
- return new StaticPage(pathPrefix, basePath, mimeType);
+ return new StaticPage(pathPrefix, basePath, mimeType) {
+ };
+ }
+
+ @Override
+ public TemplateProvider getTemplateProvider() {
+ return new ClassPathTemplateProvider(WebInterface.class, "/templates/");
}
}