diff --git a/org.springframework.web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java b/org.springframework.web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java index 8489902b479..b86ef728b51 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java +++ b/org.springframework.web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,9 @@ import java.lang.annotation.Target; * to have very flexible signatures. They may have arguments of the following * types, in arbitrary order: *
NOTE: @RequestMapping will only be processed if a
- * corresponding HandlerMapping (for type level annotations)
- * and/or HandlerAdapter (for method level annotations) is
- * present in the dispatcher. This is the case by default in both
- * DispatcherServlet and DispatcherPortlet.
- * However, if you are defining custom HandlerMappings or
- * HandlerAdapters, then you need to make sure that a
- * corresponding custom DefaultAnnotationHandlerMapping
- * and/or AnnotationMethodHandlerAdapter is defined as well
- * - provided that you intend to use @RequestMapping.
+ *
Note: In Portlet environments, {@code ExceptionHandler} annotated methods + * will only be called during the render and resource phases - just like + * {@link org.springframework.web.portlet.HandlerExceptionResolver} beans would. + * Exceptions carried over from the action and event phases will be invoked during + * the render phase as well, with exception handler methods having to be present + * on the controller class that defines the applicable render method. * * @author Arjen Poutsma + * @author Juergen Hoeller + * @since 3.0 * @see org.springframework.web.context.request.WebRequest * @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - * @since 3.0 + * @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @@ -109,8 +110,8 @@ import java.lang.annotation.Target; public @interface ExceptionHandler { /** - * Exceptions handled by the annotation method. If empty, will default to any exceptions listed in the method - * argument list. + * Exceptions handled by the annotation method. If empty, will default + * to any exceptions listed in the method argument list. */ Class extends Throwable>[] value() default {};