--- /dev/null
+package de.juplo.demo.httpresources;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+
+@Controller
+public class DefaceController
+{
+ @RequestMapping("/{path}.html")
+ public String controller(
+ @PathVariable String path,
+ @RequestParam(required = false) String origin,
+ Model model)
+ {
+ if (origin == null)
+ return "redirect:/help.html";
+
+ model.addAttribute("template", origin);
+ return path;
+ }
+}
+++ /dev/null
-package de.juplo.demo.httpresources;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-
-@Controller
-public class DemoController
-{
- @RequestMapping("/controller.html")
- public String controller(
- @RequestParam(defaultValue = "index") String template,
- Model model)
- {
- model.addAttribute("template", template);
- return template;
- }
-}
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Help</title>
+ </head>
+ <body>
+ <h1>Help</h1>
+ <formgroup>
+ Start any webserver at <strong>http://localhost:8888</strong> or
+ overwrite <strong>origin</strong> in the
+ <strong>application.properties</strong>...
+ </formgroup>
+ </body>
+</html>