@ControllerAdvice
public class ExceptionHandlingController {
@ExceptionHandler(value = Exception.class)
public ModelAndView handleUserNotFoundException(Exception e) {
System.out.println(2);
ModelAndView m = new ModelAndView();
m.addObject("errorCode", e.getMessage());
m.setViewName("auth");
System.out.println(e.getMessage());
return m;
}
}