|
|
|
@ -71,23 +71,25 @@ import org.springframework.core.annotation.AliasFor; |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>The following return types are supported for handler methods: |
|
|
|
* <p>The following return types are supported for handler methods: |
|
|
|
* <ul> |
|
|
|
* <ul> |
|
|
|
* <li>A {@code ModelAndView} object (from Servlet MVC). |
|
|
|
* <li>{@code ModelAndView} object (from Servlet MVC). |
|
|
|
* <li>A {@link org.springframework.ui.Model} object, with the view name implicitly |
|
|
|
* <li>{@link org.springframework.ui.Model} object, with the view name implicitly |
|
|
|
* determined through a {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
|
|
|
* determined through a {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
|
|
|
* <li>A {@link java.util.Map} object for exposing a model, |
|
|
|
* <li>{@link java.util.Map} object for exposing a model, |
|
|
|
* with the view name implicitly determined through a |
|
|
|
* with the view name implicitly determined through a |
|
|
|
* {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
|
|
|
* {@link org.springframework.web.servlet.RequestToViewNameTranslator}. |
|
|
|
* <li>A {@link org.springframework.web.servlet.View} object. |
|
|
|
* <li>{@link org.springframework.web.servlet.View} object. |
|
|
|
* <li>A {@link String} value which is interpreted as view name. |
|
|
|
* <li>{@link String} value which is interpreted as view name. |
|
|
|
* <li>{@link ResponseBody @ResponseBody} annotated methods (Servlet-only) |
|
|
|
* <li>{@link ResponseBody @ResponseBody} annotated methods (Servlet-only) |
|
|
|
* to set the response content. The return value will be converted to the |
|
|
|
* to set the response content. The return value will be converted to the |
|
|
|
* response stream using |
|
|
|
* response stream using |
|
|
|
* {@linkplain org.springframework.http.converter.HttpMessageConverter message converters}. |
|
|
|
* {@linkplain org.springframework.http.converter.HttpMessageConverter message converters}. |
|
|
|
* <li>An {@link org.springframework.http.HttpEntity HttpEntity<?>} or |
|
|
|
* <li>{@link org.springframework.http.HttpEntity HttpEntity<?>} or |
|
|
|
* {@link org.springframework.http.ResponseEntity ResponseEntity<?>} object |
|
|
|
* {@link org.springframework.http.ResponseEntity ResponseEntity<?>} object |
|
|
|
* (Servlet-only) to set response headers and content. The ResponseEntity body |
|
|
|
* (Servlet-only) to set response headers and content. The ResponseEntity body |
|
|
|
* will be converted and written to the response stream using |
|
|
|
* will be converted and written to the response stream using |
|
|
|
* {@linkplain org.springframework.http.converter.HttpMessageConverter message converters}. |
|
|
|
* {@linkplain org.springframework.http.converter.HttpMessageConverter message converters}. |
|
|
|
|
|
|
|
* <li>{@link org.springframework.http.ProblemDetail} or {@link org.springframework.web.ErrorResponse} |
|
|
|
|
|
|
|
* object to render an RFC 9457 error response with details in the body. |
|
|
|
* <li>{@code void} if the method handles the response itself (by |
|
|
|
* <li>{@code void} if the method handles the response itself (by |
|
|
|
* writing the response content directly, declaring an argument of type |
|
|
|
* writing the response content directly, declaring an argument of type |
|
|
|
* {@link jakarta.servlet.ServletResponse} / {@link jakarta.servlet.http.HttpServletResponse} |
|
|
|
* {@link jakarta.servlet.ServletResponse} / {@link jakarta.servlet.http.HttpServletResponse} |
|
|
|
|