@RequestMapping(value = "/toIndex", method = RequestMethod.GET) public String toIndex(Model model) { GoodsQueryModel qm = new GoodsQueryModel(); qm.getPage().setPageSize(10); Page<GoodsModel> page = cs.queryByPage(qm); model.addAttribute("goods", page.getResult()); return "index"; }
@RequestMapping(value = "/toGoodsDesc/{uuid}", method = RequestMethod.GET) public String toIndex(Model model, @PathVariable("uuid") int uuid) { GoodsModel m = cs.getByUuid(uuid); model.addAttribute("good", m); return "goods/desc"; }