WIP
[demos/httpresources] / src / main / java / de / juplo / demo / httpresources / DemoController.java
diff --git a/src/main/java/de/juplo/demo/httpresources/DemoController.java b/src/main/java/de/juplo/demo/httpresources/DemoController.java
new file mode 100644 (file)
index 0000000..96020ff
--- /dev/null
@@ -0,0 +1,20 @@
+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;
+  }
+}