コード例 #1
0
  @RequestMapping(value = "/init-update/{id}")
  public String initUpdate(@PathVariable long id, Model model) {
    model.addAttribute("resources", resourcesService.getById(id));
    model.addAttribute("modules", resourcesService.getModules());

    return "resources/update";
  }
コード例 #2
0
  @RequestMapping(value = "/list", method = RequestMethod.GET)
  public String list(Model model) {
    model.addAttribute("listResources", resourcesService.getAll());
    model.addAttribute("resources", new Resources());
    model.addAttribute("modules", resourcesService.getModules());

    return "resources/list";
  }