添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.HttpMediaTypeException
org.springframework.web.HttpMediaTypeNotAcceptableException
public class HttpMediaTypeNotAcceptableException extends HttpMediaTypeException
Exception thrown when the request handler cannot generate a response that is acceptable by the client.
Since:
Author:
Arjen Poutsma
See Also:
  • Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.web. ErrorResponse

    ErrorResponse.Builder
    Constructor for when the Accept header cannot be parsed.
    Create a new HttpMediaTypeNotSupportedException.

    Methods inherited from class org.springframework.web. HttpMediaTypeException

    getBody , getDetailMessageArguments , getDetailMessageCode , getSupportedMediaTypes

    Methods inherited from class jakarta.servlet. ServletException

    getRootCause

    Methods inherited from class java.lang. Throwable

    addSuppressed , fillInStackTrace , getCause , getLocalizedMessage , getMessage , getStackTrace , getSuppressed , initCause , printStackTrace , printStackTrace , printStackTrace , setStackTrace , toString

    Methods inherited from class java.lang. Object

    clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait

    Methods inherited from interface org.springframework.web. ErrorResponse

    getDetailMessageArguments , getTitleMessageCode , updateAndGetBody

    HttpMediaTypeNotAcceptableException

    public HttpMediaTypeNotAcceptableException ( String message)
    Constructor for when the Accept header cannot be parsed.
    Parameters:
    message - the parse error message

    HttpMediaTypeNotAcceptableException

    public HttpMediaTypeNotAcceptableException ( List < MediaType > mediaTypes)
    Create a new HttpMediaTypeNotSupportedException.
    Parameters:
    mediaTypes - the list of supported media types

    getStatusCode

    public HttpStatusCode getStatusCode ()
    Description copied from interface: ErrorResponse
    Return the HTTP status code to use for the response.

    getHeaders

    public HttpHeaders getHeaders ()
    Description copied from interface: ErrorResponse
    Return headers to use for the response.