1. http status code를 활용한 방법 @ResponseStatus ( value = HttpStatus . NOT_FOUND , reason = "No such Order" ) // 404 public class OrderNotFoundException extends RuntimeException { // ... } @RequestMapping ( value = "/orders/{id}" , method = GET ) public String showOrder ( @PathVariable ( "id" ) long id , Model model ) { Order order = orderRepository . findOrderById ( id ); if ( order == null ) throw new OrderNotFoundException ( id ); model . addAttribute ( order ); return "orderDetail" ; } 2. controller를 기반으로 한 Exception 처리 @Controller public class ExceptionHandlingController { // @RequestHandler methods ... // Exception handling methods // Convert a predefined exception to an HTTP Status code @ResponseStatus ( value = HttpStatus . CONFLICT , reason = "Data integrity violation" ) // 409 @ExceptionHandler ( DataI...