public class MethodNotAllowedException extends ResponseStatusException
| Constructor and Description | 
|---|
| MethodNotAllowedException(HttpMethod method,
                         Collection<HttpMethod> supportedMethods) | 
| MethodNotAllowedException(String method,
                         Collection<HttpMethod> supportedMethods) | 
| Modifier and Type | Method and Description | 
|---|---|
| Map<String,String> | getHeaders()Return a Map with an "Allow" header. | 
| String | getHttpMethod()Return the HTTP method for the failed request. | 
| HttpHeaders | getResponseHeaders()Return HttpHeaders with an "Allow" header. | 
| Set<HttpMethod> | getSupportedMethods()Return the list of supported HTTP methods. | 
getMessage, getRawStatusCode, getReason, getStatuscontains, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MethodNotAllowedException(HttpMethod method, Collection<HttpMethod> supportedMethods)
public MethodNotAllowedException(String method, @Nullable Collection<HttpMethod> supportedMethods)
public Map<String,String> getHeaders()
getHeaders in class ResponseStatusExceptionpublic HttpHeaders getResponseHeaders()
getResponseHeaders in class ResponseStatusExceptionpublic String getHttpMethod()
public Set<HttpMethod> getSupportedMethods()