第一步:Controller控制器
@GetMapping("/update/{id}")
public String update(@PathVariable("id") Integer id, Model model){
Category category = categoryService.get(id);
model.addAttribute("category",category);
return "admin/category-add"; //跳转到编辑页面(编辑和增加使用同一个页面)
}
第二步:category-add页面:
名称: