Getting URL Attribute Value in Thymeleaf (#12766)

This commit is contained in:
ACHRAF TAITAI
2022-09-25 20:06:25 +02:00
committed by GitHub
parent efb70f280c
commit 38be954b01
2 changed files with 30 additions and 0 deletions
@@ -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";
}
}