From c1bf7dd19511d27e3a4caa44a88eb284c91acb36 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jan 2021 15:35:13 +0100 Subject: [PATCH] WIP --- .../demo/httpresources/DemoController.java | 20 +++++++++++++++++++ src/main/resources/application.properties | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 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 index 0000000..96020ff --- /dev/null +++ b/src/main/java/de/juplo/demo/httpresources/DemoController.java @@ -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; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f889427..dd14ca8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,4 +4,4 @@ juplo.http-resources.protocol-resolver.enabled=true spring.web.resources.static-locations"=classpath:/overwrite/,${origin},classpath:/fallback/ spring.thymeleaf.prefix=/ spring.thymeleaf.suffix=.html - +logging.level.de.juplo=DEBUG -- 2.20.1