程序包 cn.taketoday.web
类 HttpRequestMethodNotSupportedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.core.NestedRuntimeException
cn.taketoday.web.HttpRequestMethodNotSupportedException
- 所有已实现的接口:
HttpStatusCodeProvider,ErrorResponse,Serializable
public class HttpRequestMethodNotSupportedException
extends cn.taketoday.core.NestedRuntimeException
implements ErrorResponse
Exception thrown when a request handler does not support a
specific request method.
- 从以下版本开始:
- 4.0 2022/1/29 10:29
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明Create a new HttpRequestMethodNotSupportedException.HttpRequestMethodNotSupportedException(String method, String msg) Create a new HttpRequestMethodNotSupportedException.HttpRequestMethodNotSupportedException(String method, String[] supportedMethods) Create a new HttpRequestMethodNotSupportedException.HttpRequestMethodNotSupportedException(String method, String[] supportedMethods, String msg) Create a new HttpRequestMethodNotSupportedException.HttpRequestMethodNotSupportedException(String method, Collection<String> supportedMethods) Create a new HttpRequestMethodNotSupportedException. -
方法概要
修饰符和类型方法说明getBody()Return the body for the response, formatted as an RFC 7807ProblemDetailwhosestatusshould match the response status.Return headers to use for the response.Return the HTTP request method that caused the failure.Return the HTTP status code to use for the response.Return the actually supported HTTP methods asHttpMethodinstances, ornullif not known.String[]Return the actually supported HTTP methods, ornullif not known.从类继承的方法 cn.taketoday.core.NestedRuntimeException
contains, getMostSpecificCause, getNestedMessage, getRootCause
-
字段详细资料
-
method
-
supportedMethods
-
body
-
-
构造器详细资料
-
HttpRequestMethodNotSupportedException
Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request method
-
HttpRequestMethodNotSupportedException
Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request methodmsg- the detail message
-
HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(String method, @Nullable Collection<String> supportedMethods) Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request methodsupportedMethods- the actually supported HTTP methods (may benull)
-
HttpRequestMethodNotSupportedException
Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request methodsupportedMethods- the actually supported HTTP methods (may benull)
-
HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(String method, @Nullable String[] supportedMethods, String msg) Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request methodsupportedMethods- the actually supported HTTP methodsmsg- the detail message
-
-
方法详细资料
-
getMethod
Return the HTTP request method that caused the failure. -
getSupportedMethods
Return the actually supported HTTP methods, ornullif not known. -
getSupportedHttpMethods
Return the actually supported HTTP methods asHttpMethodinstances, ornullif not known. -
getStatusCode
从接口复制的说明:ErrorResponseReturn the HTTP status code to use for the response.- 指定者:
getStatusCode在接口中ErrorResponse- 指定者:
getStatusCode在接口中HttpStatusCodeProvider
-
getHeaders
从接口复制的说明:ErrorResponseReturn headers to use for the response.- 指定者:
getHeaders在接口中ErrorResponse
-
getBody
从接口复制的说明:ErrorResponseReturn the body for the response, formatted as an RFC 7807ProblemDetailwhosestatusshould match the response status.- 指定者:
getBody在接口中ErrorResponse
-