File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 33import org .springframework .stereotype .Controller ;
44import org .springframework .ui .Model ;
55import org .springframework .web .bind .annotation .GetMapping ;
6+ import org .springframework .web .bind .annotation .PathVariable ;
67
78@ Controller
89public class HiddenController {
@@ -13,9 +14,10 @@ public String index(Model model) {
1314 return "hidden" ;
1415 }
1516
16- @ GetMapping ("/hidden/hidden2" )
17- public String jwtAuth (Model model ) {
18- model .addAttribute ("title" , "Rando hidden page" );
17+ @ GetMapping ("/hidden/{id}" )
18+ public String jwtAuth (Model model , @ PathVariable ("id" ) String id ) {
19+ String title = "Random hidden page : " + id ;
20+ model .addAttribute ("title" , title );
1921 return "hidden2" ;
2022 }
2123}
Original file line number Diff line number Diff line change 11<!DOCTYPE html>
2- < html lang ="en ">
3- < head >
4- < meta charset ="UTF-8 ">
5- < title > <!DOCTYPE html>
6- < html lang ="en " xmlns ="http://www.w3.org/1999/xhtml " xmlns:th ="https://www.thymeleaf.org "
7- xmlns:sec ="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3 ">
8- < head >
2+ < html lang ="en " xmlns ="http://www.w3.org/1999/xhtml " xmlns:th ="https://www.thymeleaf.org "
3+ xmlns:sec ="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3 ">
4+ < head >
95 < title th:text ="${title} "> </ title >
10- < th:block th:replace ="general.html :: head "/>
6+ < th:block th:replace ="general.html :: head "/>
7+ </ head >
118
129 < style >
1310 # results {
You can’t perform that action at this time.
0 commit comments