예제 #1
0
 private void checkUrlAndBodyForId(Long id, LunchMenuDto lunchMenuDto) {
   if (!id.equals(lunchMenuDto.getIdLunchMenu())) {
     throw new ExceptionDifferentIdBetweenUrlAndBody(
         String.format(
             "'idLunchMenu' in URL (%s) must be as same as in request body (%s).",
             id, lunchMenuDto.getIdLunchMenu()));
   }
 }
 private boolean isSameTodo(@PathVariable Long id, @RequestBody Todo todo) {
   return !id.equals(todo.getId());
 }