親:
@ExceptionHandler(NoUserException.class)
protected ModelAndView handleException(NoUserException e) {
Map<String, Object> model = new HashMap<String, Object>();
model.put(ModelKeys.HOST_KEY, "message");
return new ModelAndView("noAccess",model);
}
子供:
@ExceptionHandler(NoUserException.class)
protected void handleException(NoUserException e, HttpServletRequest request, HttpServletResponse response) throws IOException {
logger.error("Invalid user.");
respond(CLIENT_USER_ERROR,response);
}
はい、異なるパラメーターと出力が必要です。