61,111
社区成员
发帖
与我相关
我的任务
分享
@RequestMapping(value = {"/detail/{material_id}/{name}/{type}"})
public String gotodetailpage(@PathVariable("material_id") Integer material_id,@PathVariable("name") String name,@PathVariable("type") String type,HttpSession session,Model model){
material material=materialservice.SelectById(material_id);
String url=material.getUrl();
session.setAttribute("material_id",material_id);
session.setAttribute("url",url);
session.setAttribute("name",name);
session.setAttribute("type",type);
Collection<comment> comments=commentservice.SelectById(material_id);
model.addAttribute("comments",comments);
return "/detailpage";
}