public class FixedContentNegotiationStrategy extends java.lang.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 |
---|---|
java.util.List<MediaType> |
resolveMediaTypes(NativeWebRequest request)
Resolve the given request to a list of media types.
|
public FixedContentNegotiationStrategy(MediaType contentType)
public java.util.List<MediaType> resolveMediaTypes(NativeWebRequest request)
ContentNegotiationStrategy
resolveMediaTypes
in interface ContentNegotiationStrategy
request
- the current requestnull
)