类 HttpRequestMethodNotSupportedException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- javax.servlet.ServletException
- org.springframework.web.HttpRequestMethodNotSupportedException
- 所有已实现的接口:
Serializable
public class HttpRequestMethodNotSupportedException extends ServletException
Exception thrown when a request handler does not support a specific request method.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 HttpRequestMethodNotSupportedException(String method)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.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetMethod()Return the HTTP request method that caused the failure.Set<HttpMethod>getSupportedHttpMethods()Return the actually supported HTTP methods asHttpMethodinstances, ornullif not known.String[]getSupportedMethods()Return the actually supported HTTP methods, ornullif not known.从类继承的方法 javax.servlet.ServletException
getRootCause
构造器详细资料
HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(String method)
Create a new HttpRequestMethodNotSupportedException.- 参数:
method- the unsupported HTTP request method
HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(String method, String msg)
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
public HttpRequestMethodNotSupportedException(String method, @Nullable String[] supportedMethods)
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
方法详细资料
getSupportedMethods
@Nullable public String[] getSupportedMethods()
Return the actually supported HTTP methods, ornullif not known.
getSupportedHttpMethods
@Nullable public Set<HttpMethod> getSupportedHttpMethods()
Return the actually supported HTTP methods asHttpMethodinstances, ornullif not known.- 从以下版本开始:
- 3.2