Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.     @GetMapping("/edit/{id}")
  2.     public ModelAndView editDevice( @PathVariable("id") Long deviceId) {
  3.         ModelAndView mav = new ModelAndView("device-form");
  4.         mav.addObject("device", deviceRepository.findById(deviceId).orElseThrow(()-> new IllegalArgumentException("jakis tam tekst ze nie ma takiego obiektu")));
  5.         return mav;
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement