接口 ContentNegotiationStrategy
- 所有已知实现类:
AbstractMappingContentNegotiationStrategy,ContentNegotiationManager,FixedContentNegotiationStrategy,HeaderContentNegotiationStrategy,ParameterContentNegotiationStrategy,PathExtensionContentNegotiationStrategy
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
A strategy for resolving the requested media types for a request.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段修饰符和类型字段说明A singleton list withMediaType.ALLthat is returned fromresolveMediaTypes(cn.taketoday.web.RequestContext)when no specific media types are requested. -
方法概要
修饰符和类型方法说明resolveMediaTypes(RequestContext context) Resolve the given request to a list of media types.
-
字段详细资料
-
MEDIA_TYPE_ALL_LIST
A singleton list withMediaType.ALLthat is returned fromresolveMediaTypes(cn.taketoday.web.RequestContext)when no specific media types are requested.
-
-
方法详细资料
-
resolveMediaTypes
List<MediaType> resolveMediaTypes(RequestContext context) throws HttpMediaTypeNotAcceptableException Resolve the given request to a list of media types. The returned list is ordered by specificity first and by quality parameter second.- 参数:
context- the current request context- 返回:
- the requested media types, or
MEDIA_TYPE_ALL_LISTif none were requested. - 抛出:
HttpMediaTypeNotAcceptableException- if the requested media types cannot be parsed
-