类 HttpMediaTypeNotSupportedException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- javax.servlet.ServletException
- org.springframework.web.HttpMediaTypeException
- org.springframework.web.HttpMediaTypeNotSupportedException
- 所有已实现的接口:
Serializable
public class HttpMediaTypeNotSupportedException extends HttpMediaTypeException
Exception thrown when a client POSTs, PUTs, or PATCHes content of a type not supported by request handler.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 HttpMediaTypeNotSupportedException(String message)
Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, String msg)
Create a new HttpMediaTypeNotSupportedException.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 MediaType
getContentType()
Return the HTTP request content type method that caused the failure.从类继承的方法 org.springframework.web.HttpMediaTypeException
getSupportedMediaTypes
从类继承的方法 javax.servlet.ServletException
getRootCause
构造器详细资料
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(String message)
Create a new HttpMediaTypeNotSupportedException.- 参数:
message
- the exception message
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.- 参数:
contentType
- the unsupported content typesupportedMediaTypes
- the list of supported media types
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, String msg)
Create a new HttpMediaTypeNotSupportedException.- 参数:
contentType
- the unsupported content typesupportedMediaTypes
- the list of supported media typesmsg
- the detail message
方法详细资料
getContentType
public MediaType getContentType()
Return the HTTP request content type method that caused the failure.