Esempio n. 1
0
 @PreAuthorize("hasAuthority('ADMIN')")
 @RequestMapping(value = "/admin/marca", method = RequestMethod.GET)
 public String marca(@RequestParam(value = "id", required = true) long id, Model model) {
   System.out.println("Marca -> GET");
   Marca marca = mar.findOne(id);
   model.addAttribute("marca", marca);
   return "admin@marcaEditForm";
 }
Esempio n. 2
0
 @PreAuthorize("hasAuthority('ADMIN')")
 @RequestMapping(value = "/json/marca/{id}", method = RequestMethod.GET)
 public @ResponseBody Marca marcaJSON(@PathVariable long id, Model model) {
   return mar.findOne(id);
 }