类 HeaderContentTypeResolver
- java.lang.Object
- org.springframework.web.reactive.accept.HeaderContentTypeResolver
- 所有已实现的接口:
RequestedContentTypeResolver
public class HeaderContentTypeResolver extends Object implements RequestedContentTypeResolver
Resolver that looks at the 'Accept' header of the request.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
字段概要
从接口继承的字段 org.springframework.web.reactive.accept.RequestedContentTypeResolver
MEDIA_TYPE_ALL_LIST
构造器概要
构造器 构造器 说明 HeaderContentTypeResolver()
构造器详细资料
HeaderContentTypeResolver
public HeaderContentTypeResolver()
方法详细资料
resolveMediaTypes
public List<MediaType> resolveMediaTypes(ServerWebExchange exchange) throws NotAcceptableStatusException
从接口复制的说明:RequestedContentTypeResolver
Resolve the given request to a list of requested media types. The returned list is ordered by specificity first and by quality parameter second.- 指定者:
resolveMediaTypes
在接口中RequestedContentTypeResolver
- 参数:
exchange
- the current exchange- 返回:
- the requested media types, or
RequestedContentTypeResolver.MEDIA_TYPE_ALL_LIST
if none were requested. - 抛出:
NotAcceptableStatusException
- if the requested media type is invalid