Make AbstractHandlerMethodExceptionResolver an abstract class.
This commit is contained in:
parent
ab6a7e8e74
commit
6da6acbe54
|
|
@ -20,7 +20,7 @@ Changes in version 3.1.1 (2012-02-06)
|
||||||
* Hibernate 4 LocalSessionFactoryBean does not insist on a "dataSource" reference being set
|
* Hibernate 4 LocalSessionFactoryBean does not insist on a "dataSource" reference being set
|
||||||
* added "entityInterceptor" property to Hibernate 4 LocalSessionFactoryBean
|
* added "entityInterceptor" property to Hibernate 4 LocalSessionFactoryBean
|
||||||
* corrected fix for QuartzJobBean to work with Quartz 2.0/2.1
|
* corrected fix for QuartzJobBean to work with Quartz 2.0/2.1
|
||||||
|
* Make AbstractHandlerMethodExceptionResolver an abstract class
|
||||||
|
|
||||||
Changes in version 3.1 GA (2011-12-12)
|
Changes in version 3.1 GA (2011-12-12)
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,14 @@ import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract base class for {@link org.springframework.web.servlet.HandlerExceptionResolver HandlerExceptionResolver}
|
* Abstract base class for
|
||||||
* implementations that support handling exceptions from {@link HandlerMethod}s rather than handlers.
|
* {@link org.springframework.web.servlet.HandlerExceptionResolver HandlerExceptionResolver}
|
||||||
|
* implementations that support handling exceptions from handlers of type {@link HandlerMethod}.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public class AbstractHandlerMethodExceptionResolver extends AbstractHandlerExceptionResolver {
|
public abstract class AbstractHandlerMethodExceptionResolver extends AbstractHandlerExceptionResolver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the handler is a {@link HandlerMethod} instance and performs the check against the bean
|
* Checks if the handler is a {@link HandlerMethod} instance and performs the check against the bean
|
||||||
|
|
@ -52,10 +53,10 @@ public class AbstractHandlerMethodExceptionResolver extends AbstractHandlerExcep
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final ModelAndView doResolveException(HttpServletRequest request,
|
protected final ModelAndView doResolveException(
|
||||||
HttpServletResponse response,
|
HttpServletRequest request, HttpServletResponse response,
|
||||||
Object handler,
|
Object handler, Exception ex) {
|
||||||
Exception ex) {
|
|
||||||
return doResolveHandlerMethodException(request, response, (HandlerMethod) handler, ex);
|
return doResolveHandlerMethodException(request, response, (HandlerMethod) handler, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,11 +74,8 @@ public class AbstractHandlerMethodExceptionResolver extends AbstractHandlerExcep
|
||||||
* @param ex the exception that got thrown during handler execution
|
* @param ex the exception that got thrown during handler execution
|
||||||
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
|
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
|
||||||
*/
|
*/
|
||||||
protected ModelAndView doResolveHandlerMethodException(HttpServletRequest request,
|
protected abstract ModelAndView doResolveHandlerMethodException(
|
||||||
HttpServletResponse response,
|
HttpServletRequest request, HttpServletResponse response,
|
||||||
HandlerMethod handlerMethod,
|
HandlerMethod handlerMethod, Exception ex);
|
||||||
Exception ex) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue