在您提供的教程中,它指出您必须像这样使用控制器:
@RequestMapping(value="/word/wordList", method=RequestMethod.GET)
public String getWordList(Model model, Pageable pageable) {
Page<Word> wordPage = wordService.getAllWord(pageable);
PageWrapper<Word> page = new PageWrapper<Word>(wordPage, "/word/wordList");
model.addAttribute("page", page);
model.addAttribute("words", page.getContent());
return "/word/wordList";
}
但您设置:
model.addAttribute("nubmerOfPage", batchExecuteHistory.getContent());
因此,将其设置为应该可以解决此问题:
model.addAttribute("nubmerOfPage", batchExecuteHistory);