通过springboot用restful风格进行crud操作时,进行Put映射时,特别注意表单是不能够进行put请求的,所以要用下面的表达方式来进行
<form th:action="@{/emp}" method="post">
<input type="hidden" name="_method" value="put" th:if="${emp!=null}"/>
<input type="hidden" name="id" th:if="${emp!=null}" th:value="${emp.id}">
转载请注明原文地址: https://mac.8miu.com/read-155208.html