@Override
protected ModelAndView doResolveException(
PortletRequest request, MimeResponse response, Object handler, Exception ex) {
if (handler != null) {
Method handlerMethod = findBestExceptionHandlerMethod(handler, ex);
if (handlerMethod != null) {
NativeWebRequest webRequest = new PortletWebRequest(request, response);
try {
Object[] args = resolveHandlerArguments(handlerMethod, handler, webRequest, ex);
if (logger.isDebugEnabled()) {
logger.debug("Invoking request handler method: " + handlerMethod);
}
Object retVal = doInvokeMethod(handlerMethod, handler, args);
return getModelAndView(retVal);
}
catch (Exception invocationEx) {
logger.error("Invoking request method resulted in exception : " + handlerMethod, invocationEx);
}
}
}
return null;
}
AnnotationMethodHandlerExceptionResolver.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:spring4-understanding
作者:
评论列表
文章目录