AnnotationMethodHandlerExceptionResolver.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:class-guard 作者:
@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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号