Added a rest-controller, that serves the fetched data as text/plain
[demos/testing] / src / main / java / de / juplo / demo / HtmlController.java
index 92ed7ff..d048ffe 100644 (file)
@@ -1,6 +1,7 @@
 package de.juplo.demo;
 
 
+import org.springframework.http.MediaType;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -24,7 +25,7 @@ public class HtmlController
   }
 
 
-  @GetMapping({ "", "/" })
+  @GetMapping(path = { "", "/" }, produces = MediaType.TEXT_HTML_VALUE)
   public String fetch(Model model, @RequestParam(required = false) String path)
   {
     model.addAttribute("path", path);