public class FixedContentNegotiationStrategy extends java.lang.Object implements ContentNegotiationStrategy
Modifier and Type | Field and Description |
---|---|
private MediaType |
defaultContentType |
private static Log |
logger |
Constructor and Description |
---|
FixedContentNegotiationStrategy(MediaType defaultContentType)
Create an instance that always returns the given content type.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<MediaType> |
resolveMediaTypes(NativeWebRequest webRequest)
Resolve the given request to a list of media types.
|
private static final Log logger
private final MediaType defaultContentType
public FixedContentNegotiationStrategy(MediaType defaultContentType)
public java.util.List<MediaType> resolveMediaTypes(NativeWebRequest webRequest)
ContentNegotiationStrategy
resolveMediaTypes
in interface ContentNegotiationStrategy
webRequest
- the current requestnull