--- /dev/null
+package de.juplo.demo;
+
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+
+/**
+ * Fetches data from a remote-webserver and renders it as HTML.
+ * @author Kai Moritz
+ */
+@Controller
+public class HtmlController
+{
+ RemoteContentService service;
+
+
+ public HtmlController(RemoteContentService service)
+ {
+ this.service = service;
+ }
+
+
+ @GetMapping("/")
+ public String fetch(Model model, @RequestParam String path)
+ {
+ model.addAttribute("text", service.getRemoteText(path));
+ return "layout";
+ }
+}