allow for writing the response directly in a Portlet @ExceptionHandler method (like in the Servlet equivalent)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3645 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-09-06 21:43:26 +00:00
parent 25a6ffa75f
commit ea2bbbb3be
3 changed files with 35 additions and 7 deletions
@@ -74,16 +74,18 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
/**
* Set a custom ArgumentResolvers to use for special method parameter types. Such a custom ArgumentResolver will kick
* in first, having a chance to resolve an argument value before the standard argument handling kicks in.
* Set a custom ArgumentResolvers to use for special method parameter types.
* <p>Such a custom ArgumentResolver will kick in first, having a chance to resolve
* an argument value before the standard argument handling kicks in.
*/
public void setCustomArgumentResolver(WebArgumentResolver argumentResolver) {
this.customArgumentResolvers = new WebArgumentResolver[]{argumentResolver};
}
/**
* Set one or more custom ArgumentResolvers to use for special method parameter types. Any such custom ArgumentResolver
* will kick in first, having a chance to resolve an argument value before the standard argument handling kicks in.
* Set one or more custom ArgumentResolvers to use for special method parameter types.
* <p>Any such custom ArgumentResolver will kick in first, having a chance to resolve
* an argument value before the standard argument handling kicks in.
*/
public void setCustomArgumentResolvers(WebArgumentResolver[] argumentResolvers) {
this.customArgumentResolvers = argumentResolvers;
@@ -366,7 +368,7 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
return new ModelAndView((String) returnValue);
}
else if (returnValue == null) {
return null;
return new ModelAndView();
}
else {
throw new IllegalArgumentException("Invalid handler method return value: " + returnValue);