接口 ContentNegotiationStrategy
- 所有已知实现类:
AbstractMappingContentNegotiationStrategy
,ContentNegotiationManager
,FixedContentNegotiationStrategy
,HeaderContentNegotiationStrategy
,ParameterContentNegotiationStrategy
,PathExtensionContentNegotiationStrategy
,ServletPathExtensionContentNegotiationStrategy
public interface ContentNegotiationStrategy
A strategy for resolving the requested media types for a request.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 List<MediaType>
resolveMediaTypes(NativeWebRequest webRequest)
Resolve the given request to a list of media types.
方法详细资料
resolveMediaTypes
List<MediaType> resolveMediaTypes(NativeWebRequest webRequest) 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.- 参数:
webRequest
- the current request- 返回:
- the requested media types or an empty list (never
null
) - 抛出:
HttpMediaTypeNotAcceptableException
- if the requested media types cannot be parsed