html
<form th:action="@{/emp}" method="post">
<!--发送put请求修改数据-->
<input type="hidden" name="_method" value="put">
<!--发送id--><!--因为修改员工的时候需要用到id-->
<input type="hidden" name="id" th:value="${employee.id}">
controller
@PutMapping("/emp")
public String editEmployee(Employee employee){
// 修改员工信息
employeeDao.save(employee);
//返回员工列表页面
return "redirect:/emps";
}