@ExceptionHandler 어노테이션을 이용한 예외 처리 컨트롤러의 @RequestMapping 메서드를 실행하는 과정에서 예외가 발생할 때 직접 예외 처리를 하고 싶다면, @ExceptionHandler 어노테이션을 사용하면 된다. 다음 코드를 보자. @Controller public class CalculationController { @RequestMapping("/cal/divide") public String divide(Model model, @RequestParam("op1") int op1, @RequestParam("op2") int op2) { model.addAttribute("result", op1 / op2); return "cal/result"; } @ExceptionHan..