@RequestMapping(value = "/ChoiceQuestion", method = RequestMethod.GET) public String ChoiceQuestion( @RequestParam(value = "id", required = true, defaultValue = "1") String id, Model model) { model.addAttribute(QUESTIONNUM, choiceQuestionRepository.count()); model.addAttribute(CHOICEQUESTION, choiceQuestionRepository.findById(Long.valueOf(id))); return "views/answerPage"; }