Merge pull request #7612 from Maiklins/BAEL-3012-move-thymeleaf-parameters-to-new-module
BAEL 3012 move thymeleaf parameters to new module
This commit is contained in:
commit
5985675737
|
@ -2,3 +2,4 @@
|
|||
|
||||
- [Working with Enums in Thymeleaf](https://www.baeldung.com/thymeleaf-enums)
|
||||
- [Changing the Thymeleaf Template Directory in Spring Boot](https://www.baeldung.com/spring-thymeleaf-template-directory)
|
||||
- [Spring Request Parameters with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-request-parameters)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.demo;
|
||||
package com.baeldung.thymeleaf.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
@ -12,7 +12,7 @@ import static java.util.Arrays.asList;
|
|||
@Controller
|
||||
public class ParticipantController {
|
||||
|
||||
@RequestMapping("/")
|
||||
@RequestMapping("/participants")
|
||||
public String index(
|
||||
@RequestParam(value = "participant", required = false) String participant,
|
||||
@RequestParam(value = "country", required = false) String country,
|
|
@ -4,7 +4,7 @@
|
|||
</head>
|
||||
|
||||
<h2>Enter participant</h2>
|
||||
<form th:action="@{/}">
|
||||
<form th:action="@{/participants}">
|
||||
|
||||
<input type="text" th:name="participant"/>
|
||||
<select name="country">
|
||||
|
@ -25,7 +25,7 @@
|
|||
<h2>Users</h2>
|
||||
<th:block th:each="userId: ${userIds}">
|
||||
<p>
|
||||
<a th:href="@{/(id=${userId})}"> User [[${userId}]]</a>
|
||||
<a th:href="@{/participants(id=${userId})}"> User [[${userId}]]</a>
|
||||
</p>
|
||||
</th:block>
|
||||
|
Loading…
Reference in New Issue