类 FixedContentNegotiationStrategy
- java.lang.Object
- org.springframework.web.accept.FixedContentNegotiationStrategy
- 所有已实现的接口:
ContentNegotiationStrategy
public class FixedContentNegotiationStrategy extends Object implements ContentNegotiationStrategy
AContentNegotiationStrategy
that returns a fixed content type.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 FixedContentNegotiationStrategy(MediaType contentType)
Create an instance with the given content type.
构造器详细资料
FixedContentNegotiationStrategy
public FixedContentNegotiationStrategy(MediaType contentType)
Create an instance with the given content type.
方法详细资料
resolveMediaTypes
public List<MediaType> resolveMediaTypes(NativeWebRequest request)
从接口复制的说明:ContentNegotiationStrategy
Resolve the given request to a list of media types. The returned list is ordered by specificity first and by quality parameter second.- 指定者:
resolveMediaTypes
在接口中ContentNegotiationStrategy
- 参数:
request
- the current request- 返回:
- the requested media types or an empty list (never
null
)