diff --git a/spring-web-modules/spring-thymeleaf-5/src/main/java/com/baeldung/thymeleaf/url/UrlController.java b/spring-web-modules/spring-thymeleaf-5/src/main/java/com/baeldung/thymeleaf/url/UrlController.java new file mode 100644 index 0000000000..be96be5a33 --- /dev/null +++ b/spring-web-modules/spring-thymeleaf-5/src/main/java/com/baeldung/thymeleaf/url/UrlController.java @@ -0,0 +1,13 @@ +package com.baeldung.thymeleaf.url; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +@Controller +public class UrlController { + @GetMapping("/search") public String test(Model model, @RequestParam("query") String query){ + return "url/index"; + } +} diff --git a/spring-web-modules/spring-thymeleaf-5/src/main/resources/templates/url/index.html b/spring-web-modules/spring-thymeleaf-5/src/main/resources/templates/url/index.html new file mode 100644 index 0000000000..a8ac95aea3 --- /dev/null +++ b/spring-web-modules/spring-thymeleaf-5/src/main/resources/templates/url/index.html @@ -0,0 +1,17 @@ + + +
+ + + +