|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2014 the original author or authors. |
| 2 | + * Copyright 2002-2015 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
27 | 27 | * handler methods. Provides consistent style between Servlet and Portlet
|
28 | 28 | * environments, with the semantics adapting to the concrete environment.
|
29 | 29 | *
|
30 |
| - * <p>Handler methods which are annotated with this annotation are allowed |
31 |
| - * to have very flexible signatures. They may have arguments of the following |
| 30 | + * <p>Handler methods which are annotated with this annotation are allowed to |
| 31 | + * have very flexible signatures. They may have parameters of the following |
32 | 32 | * types, in arbitrary order:
|
33 | 33 | * <ul>
|
34 | 34 | * <li>An exception argument: declared as a general Exception or as a more
|
|
48 | 48 | * As a consequence, such an argument will never be {@code null}.
|
49 | 49 | * <i>Note that session access may not be thread-safe, in particular in a
|
50 | 50 | * Servlet environment: Consider switching the
|
51 |
| - * {@link org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#setSynchronizeOnSession "synchronizeOnSession"} |
52 |
| - * flag to "true" if multiple requests are allowed to access a session concurrently.</i> |
| 51 | + * {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#setSynchronizeOnSession |
| 52 | + * "synchronizeOnSession"} flag to "true" if multiple requests are allowed to |
| 53 | + * access a session concurrently.</i> |
53 | 54 | * <li>{@link org.springframework.web.context.request.WebRequest} or
|
54 | 55 | * {@link org.springframework.web.context.request.NativeWebRequest}.
|
55 | 56 | * Allows for generic request parameter access as well as request/session
|
|
64 | 65 | * <li>{@link java.io.OutputStream} / {@link java.io.Writer} for generating
|
65 | 66 | * the response's content. This will be the raw OutputStream/Writer as
|
66 | 67 | * exposed by the Servlet/Portlet API.
|
| 68 | + * <li>{@link org.springframework.ui.Model} as an alternative to returning |
| 69 | + * a model map from the handler method. Note that the provided model is not |
| 70 | + * pre-populated with regular model attributes and therefore always empty, |
| 71 | + * as a convenience for preparing the model for an exception-specific view. |
67 | 72 | * </ul>
|
68 | 73 | *
|
69 | 74 | * <p>The following return types are supported for handler methods:
|
70 | 75 | * <ul>
|
71 | 76 | * <li>A {@code ModelAndView} object (Servlet MVC or Portlet MVC).
|
72 |
| - * <li>A {@link org.springframework.ui.Model Model} object, with the view name |
73 |
| - * implicitly determined through a {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
| 77 | + * <li>A {@link org.springframework.ui.Model} object, with the view name implicitly |
| 78 | + * determined through a {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
74 | 79 | * <li>A {@link java.util.Map} object for exposing a model,
|
75 | 80 | * with the view name implicitly determined through a
|
76 | 81 | * {@link org.springframework.web.servlet.RequestToViewNameTranslator}.
|
|
0 commit comments