<!--需要区分是员工修改还是添加;-->
<form th:action="@{/emp}" method="post">
<!--发送put请求修改员工数据-->
<!--
1、SpringMVC中配置HiddenHttpMethodFilter;(SpringBoot自动配置好的)
2、页面创建一个post表单
3、创建一个input项,name="_method";值就是我们指定的请求方式
-->
<input type="hidden" name="_method" value="put" th:if="${emp!=null}"/>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-11-03
  • 2022-02-13
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案