标签: java spring spring-mvc
答案 0 :(得分:4)
你试过@ExceptionHandler吗?
@ExceptionHandler(YourException.class) public ModelAndView handleException(YourException e, HttpServletRequest request) { // Handle it return yourView; }