toErrorPage 수정

master
mjkhan21 11 months ago
parent 31f4f57695
commit 6ff7ff1a06

@ -29,7 +29,7 @@ public class ExceptionController extends AbstractController {
} }
protected ModelAndView toErrorPage(HttpServletRequest hreq, Object status, String msgKey) { protected ModelAndView toErrorPage(HttpServletRequest hreq, Object status, String msgKey) {
Object disp = hreq.getRequestDispatcher("error/errorPage"); Object disp = hreq != null ? hreq.getRequestDispatcher("error/errorPage") : null;
String viewName = disp != null ? "error/errorPage" : "jsonView" ; String viewName = disp != null ? "error/errorPage" : "jsonView" ;
return new ModelAndView(viewName) return new ModelAndView(viewName)
.addObject("json", "jsonView".equals(viewName) || ajaxRequest() || jsonResponse()) .addObject("json", "jsonView".equals(viewName) || ajaxRequest() || jsonResponse())

Loading…
Cancel
Save