SHARE
TWEET

Untitled

a guest May 27th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @RequestMapping(path="/{dishId}")
  2.     public Dish getDishById(@PathVariable("dishId") long dishId) {
  3.         Optional<Dish> dish = this.dishService.getDishById(dishId);
  4.         if(dish.isPresent()) {
  5.             return dish.get();
  6.         } else {
  7.             throw new ResponseStatusException(
  8.                     HttpStatus.NOT_FOUND, "Dish category not found"
  9.             );
  10.         }
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top