spring技巧

[b]1.获取前端request context[/b]
@RequestMapping("/search/data")
public String search(PagingVO page, FrontCourseCatalogSearchVO searchVO, Model model, HttpServletRequest request) {
page.setPageSize(searchVO.getMySize());

searchVO.setInternalOnly(isInternalOnlySearch());

PagingVO vo = catalogService.search(page, searchVO);
model.addAttribute("pageSize", page.getPageSize());
model.addAttribute("pageVO", vo);
RequestContext context = new RequestContext(request);
model.addAttribute("lookupDeliveries", lookupService.getDeliveryMethod(context.getLocale().getLanguage()));

return "view/front/course/search_data";
}

你可能感兴趣的:(spring)