提交 04251904 编写于 作者: R Rossen Stoyanchev

Update Javadoc on @ResponseStatus

Issue: SPR-11193
上级 0ef8af47
......@@ -60,11 +60,12 @@ public @interface ResponseStatus {
/**
* The <em>reason</em> to be used for the response.
* <p>If this attribute is not set, it will default to the standard status
* message for the status code. Note that due to the use of
* <p><strong>Note:</strong> due to the use of
* {@code HttpServletResponse.sendError(int, String)}, the response will be
* considered complete and should not be written to any further.
*
* considered complete and should not be written to any further. Furthermore
* servlet container will typically write an HTML error page therefore making
* the use of a reason unsuitable for REST APIs. For such cases prefer
* sending error details in the body of the response.
* @see javax.servlet.http.HttpServletResponse#sendError(int, String)
*/
String reason() default "";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册