resulta que al ejecutar mi aplicacion spring boot no captura la variable, y me muestra un error 404:
There was an unexpected error (type=Not Found, status=404). No message available
Código:
@RequestMapping( value = "/delete/{id}", method = RequestMethod.GET)
public String deleteAll(@PathVariable("id") int va){
System.out.println(va);
return "redirect:/show";
}
html con thymeleaf:
<table class="table table-condensed table-bordered">
<th>
<tr>
<td>Order id</td>
<td>Customer id</td>
<td>Product</td>
<td>Action</td>
</tr>
</th>
<th:block th:each="list : ${lists}">
<tr>
<td th:text="${list.orderId}">...</td>
<td th:text="${list.customer.name}">...</td>
<td th:text="${list.product}">...</td>
<td>
<a th:href="@{/delete/(id=${list.orderId})}">Delete</a>...
</td>
</tr>
</th:block>
</table>