标签:Springboot
JAVA@RequestMapping(value = "/user-list", method = { RequestMethod.POST })
public String userList(Model model, @RequestParam(value = "models", required = false) String models) {
Map searchParameters = new HashMap();
if (models != null && models.length() > 0) {
try {
searchParameters = objectMapper.readValue(models, new TypeReference<Map>() {
});
} catch (JsonParseException e) {
log.error("JsonParseException{}:", e.getMessage());
} catch (JsonMappingException e) {
log.error("JsonMappingException{}:", e.getMessage());
} catch (IOException e) {
log.error("IOException{}:", e.getMessage());
}
}
Map map = userService.getPage(searchParameters, salt);
// 用户表格数据
model.addAttribute("list", map.get("users"));
// 总条数
model.addAttribute("total", map.get("total"));
return "sys/user-list";
}
SpingBoot-Thymeleaf-bootstrapTable-分页之Controller
标签:Springboot
原文地址:http://blog.51cto.com/360douruanliang/2107780