Exception 예 더보기 // ExceptionController.java @Controller public class ExceptionController { @ExceptionHandler(Exception.class) // ex public String catcher(Exception ex, Model m) { System.out.println("catcher() in ExceptionController"); System.out.println("m="+m); m.addAttribute("ex", ex); return "error"; } @ExceptionHandler({NullPointerException.class, FileNotFoundException.class}) // ex2 public ..
Spring | Exception
Exception 예 더보기 // ExceptionController.java @Controller public class ExceptionController { @ExceptionHandler(Exception.class) // ex public String catcher(Exception ex, Model m) { System.out.println("catcher() in ExceptionController"); System.out.println("m="+m); m.addAttribute("ex", ex); return "error"; } @ExceptionHandler({NullPointerException.class, FileNotFoundException.class}) // ex2 public ..
2023.01.19