Class HttpRequestMethodNotSupportedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.HttpRequestMethodNotSupportedException
All Implemented Interfaces:
Serializable, ErrorResponse

public class HttpRequestMethodNotSupportedException extends ServletException implements ErrorResponse
Exception thrown when a request handler does not support a specific request method.
Since:
2.0
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • HttpRequestMethodNotSupportedException

      public HttpRequestMethodNotSupportedException(String method)
      Create a new HttpRequestMethodNotSupportedException.
      Parameters:
      method - the unsupported HTTP request method
    • HttpRequestMethodNotSupportedException

      public HttpRequestMethodNotSupportedException(String method, String msg)
      Create a new HttpRequestMethodNotSupportedException.
      Parameters:
      method - the unsupported HTTP request method
      msg - the detail message
    • HttpRequestMethodNotSupportedException

      public HttpRequestMethodNotSupportedException(String method, @Nullable Collection<String> supportedMethods)
      Create a new HttpRequestMethodNotSupportedException.
      Parameters:
      method - the unsupported HTTP request method
      supportedMethods - the actually supported HTTP methods (may be null)
    • HttpRequestMethodNotSupportedException

      public HttpRequestMethodNotSupportedException(String method, @Nullable String[] supportedMethods)
      Create a new HttpRequestMethodNotSupportedException.
      Parameters:
      method - the unsupported HTTP request method
      supportedMethods - the actually supported HTTP methods (may be null)
    • HttpRequestMethodNotSupportedException

      public HttpRequestMethodNotSupportedException(String method, @Nullable String[] supportedMethods, String msg)
      Create a new HttpRequestMethodNotSupportedException.
      Parameters:
      method - the unsupported HTTP request method
      supportedMethods - the actually supported HTTP methods
      msg - the detail message
  • Method Details