类 HttpMediaTypeException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- javax.servlet.ServletException
- org.springframework.web.HttpMediaTypeException
- 所有已实现的接口:
Serializable
public abstract class HttpMediaTypeException extends ServletException
Abstract base for exceptions related to media types. Adds a list of supportedMediaTypes
.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
- 序列化表格
构造器概要
构造器 限定符 构造器 说明 protected
HttpMediaTypeException(String message)
Create a new HttpMediaTypeException.protected
HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeException with a list of supported media types.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<MediaType>
getSupportedMediaTypes()
Return the list of supported media types.从类继承的方法 javax.servlet.ServletException
getRootCause
构造器详细资料
HttpMediaTypeException
protected HttpMediaTypeException(String message)
Create a new HttpMediaTypeException.- 参数:
message
- the exception message
HttpMediaTypeException
protected HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeException with a list of supported media types.- 参数:
supportedMediaTypes
- the list of supported media types
方法详细资料
getSupportedMediaTypes
public List<MediaType> getSupportedMediaTypes()
Return the list of supported media types.