th.method thymeleaf code example
Example 1: thymeleaf form delete method
<form action="#" th:action="@{'/delete/{id}'(id=${foo.id})}" th:method="delete" >
<input type="hidden" name="_method" value="delete" />
<button type="submit" id="submitButton"> </button>
</form>
Example 2: how to use thymeleaf in html view spring
// Add xmlns:th="http://www.thymeleaf.org" into the html opening tag like
<html lang="en" xmlns:th="http://www.thymeleaf.org">