public class FixedContentNegotiationStrategy extends Object implements ContentNegotiationStrategy
ContentNegotiationStrategy
that returns a fixed content type.Constructor and Description |
---|
FixedContentNegotiationStrategy(MediaType contentType)
Create an instance with the given content type.
|
Modifier and Type | Method and Description |
---|---|
List<MediaType> |
resolveMediaTypes(NativeWebRequest request)
Resolve the given request to a list of media types.
|
public FixedContentNegotiationStrategy(MediaType contentType)
public List<MediaType> resolveMediaTypes(NativeWebRequest request)
ContentNegotiationStrategy
resolveMediaTypes
in interface ContentNegotiationStrategy
request
- the current requestnull
)