@RequestMapping("/toUpdPage/{id}")
public String toUpdPage(@PathVariable("id") Integer id,Model model){
Employee employee = employeeDao.getEmployeeById(id);
model.addAttribute("emp",employee);
//为遍历部门列表做准备
Collection departments = departmentDao.getDepartments();
model.addAttribute("departments",departments);
return "emps/updPage";
}
Dashboard Template for Bootstrap
Section title
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-z1PBUthJ-1661049775058)(…/typora-user-images/image-20220802223144025.png)]
spring:
mvc:
format:
date-time: yyyy-MM-dd HH:mm:ss:SSS
date: yyyy-MM-dd HH:mm:ss
@GetMapping("/toDelete/{id}")
public String toDelete(@PathVariable("id") Integer id){
employeeDao.delateEmployeeById(id);
return "redirect:/empls/toList";
}



