@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";
}


后來我把return"/detailpage"換成一個station.html頁面然后用重繪跳轉到detailpage。但是這樣評論是顯示不出的。
請大家幫幫忙。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/51619.html
標籤:HTML(CSS)
上一篇:cloest('td, th') 和 pushStack($cells); 不懂,請教
下一篇:gulp壓縮js報錯
