@RequestMapping(value = "/{id}", method = RequestMethod.PUT) public Restaurant updateRestaurant(@RequestBody Restaurant restaurant) { restaurantRepository.save(restaurant); return restaurant; }
@RequestMapping(method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.CREATED) public Restaurant addRestaurant(@RequestBody Restaurant restaurant) { restaurantRepository.save(restaurant); return restaurant; }