I have a Thymeleaf template in a simple Spring Boot application. The template contains a list in a table as follows:
There are
you are using Links and I don't think that is possible, you would need to use a form where you can specify the method POST to be used.
In the example below im using a instead of a element, but it will work, the only thing you need to do is to style your button with CSS to look like your links
now in your code should look like this
|
EDIT
As you just shared you Java code, in the controller you are expecting the personId not as a PathVariable, but as a RequestParam, in that case your form should have that value...
edit your form and add the person id as follows.
Notice also I changed the action of the form to be just /edit, as its what your controller looks like