@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
@Documented
public @interface ResponseStatus
ResponseStatusExceptionResolver
Modifier and Type | Required Element and Description |
---|---|
HttpStatus |
value
The status code to use for the response.
|
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
reason
The reason to be used for the response.
|
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.