|
spring-web | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Documented public @interface ResponseStatus
Marks a method or exception class with the status code and reason that should be returned. The status code is applied to the HTTP response when the handler method is invoked, or whenever said exception is thrown.
org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver
Required Element Summary | |
---|---|
HttpStatus |
value
The status code to use for the response. |
Optional Element Summary | |
---|---|
java.lang.String |
reason
The reason to be used for the response. |
Element Detail |
---|
public abstract HttpStatus value
HttpServletResponse.setStatus(int)
public abstract java.lang.String reason
If this element is not set, it will default to the standard status
message for the status code. Note that due to the use of HttpServletResponse.sendError(int, String)
,
the response will be considered complete and should not be written to any further.
HttpServletResponse.sendError(int, String)
|
spring-web | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |