接口 ContentTypeResolver
- 所有已知实现类:
DefaultContentTypeResolver
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ContentTypeResolver
Resolve the content type for a message.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
方法详细资料
resolve
@Nullable MimeType resolve(@Nullable MessageHeaders headers) throws InvalidMimeTypeException
Determine theMimeType
of a message from the given MessageHeaders.- 参数:
headers
- the headers to use for the resolution- 返回:
- the resolved
MimeType
, ornull
if none found - 抛出:
InvalidMimeTypeException
- if the content type is a String that cannot be parsedIllegalArgumentException
- if there is a content type but its type is unknown