类 MediaTypeNotSupportedStatusException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.web.server.ResponseStatusException
- org.springframework.web.server.MediaTypeNotSupportedStatusException
- 所有已实现的接口:
Serializable
@Deprecated public class MediaTypeNotSupportedStatusException extends ResponseStatusException
已过时。in favor ofUnsupportedMediaTypeStatusException
, with this class never thrown by Spring code and to be removed in 5.3Exception for errors that fit response status 415 (unsupported media type).- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 MediaTypeNotSupportedStatusException(String reason)
已过时。Constructor for when the Content-Type is invalid.MediaTypeNotSupportedStatusException(List<MediaType> supportedMediaTypes)
已过时。Constructor for when the Content-Type is not supported.
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 List<MediaType>
getSupportedMediaTypes()
已过时。Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.从类继承的方法 org.springframework.web.server.ResponseStatusException
getHeaders, getMessage, getReason, getResponseHeaders, getStatus
从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
构造器详细资料
MediaTypeNotSupportedStatusException
public MediaTypeNotSupportedStatusException(String reason)
已过时。Constructor for when the Content-Type is invalid.
MediaTypeNotSupportedStatusException
public MediaTypeNotSupportedStatusException(List<MediaType> supportedMediaTypes)
已过时。Constructor for when the Content-Type is not supported.
方法详细资料
getSupportedMediaTypes
public List<MediaType> getSupportedMediaTypes()
已过时。Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.