@GetMapping("/other") public String otherAction(final Model model) { uselessBean.setTestPro("imsetinthecontrolleronthefly"); final List task = taskRepository.findByTaskStatus("ACTIVE"); final Task activity = taskRepository.findOne(1); model.addAttribute("iwantthisinmyview", uselessBean.getTestPro()); model.addAttribute("iwantthisinmyviewfromhibernate", activity.getTaskName()); model.addAttribute("iwantthisinmyviewfromproperties", myProperty); return "home/index"; }
@GetMapping("/") public String indexAction(final Model model) { final List task = taskRepository.findByTaskStatus("ACTIVE"); final Task activity = taskRepository.findOne(1); model.addAttribute("iwantthisinmyview", uselessBean.getTestPro()); model.addAttribute("iwantthisinmyviewfromhibernate", activity.getTaskName()); return "home/index"; }