类 InvalidMediaTypeException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- java.lang.IllegalArgumentException
- org.springframework.http.InvalidMediaTypeException
- 所有已实现的接口:
Serializable
public class InvalidMediaTypeException extends IllegalArgumentException
Exception thrown fromMediaType.parseMediaType(String)
in case of encountering an invalid media type specification String.- 从以下版本开始:
- 3.2.2
- 作者:
- Juergen Hoeller
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 InvalidMediaTypeException(String mediaType, String message)
Create a new InvalidMediaTypeException for the given media type.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getMediaType()
Return the offending media type.
构造器详细资料
InvalidMediaTypeException
public InvalidMediaTypeException(String mediaType, String message)
Create a new InvalidMediaTypeException for the given media type.- 参数:
mediaType
- the offending media typemessage
- a detail message indicating the invalid part
方法详细资料
getMediaType
public String getMediaType()
Return the offending media type.