public class FixedContentTypeResolver extends Object implements RequestedContentTypeResolver
MEDIA_TYPE_ALL_LIST| Constructor and Description |
|---|
FixedContentTypeResolver(List<MediaType> contentTypes)
Constructor with an ordered List of default
MediaType's to return
for use in applications that support a variety of content types. |
FixedContentTypeResolver(MediaType mediaType)
Constructor with a single default
MediaType. |
| Modifier and Type | Method and Description |
|---|---|
List<MediaType> |
getContentTypes()
Return the configured list of media types.
|
List<MediaType> |
resolveMediaTypes(ServerWebExchange exchange)
Resolve the given request to a list of requested media types.
|
public FixedContentTypeResolver(MediaType mediaType)
MediaType.public FixedContentTypeResolver(List<MediaType> contentTypes)
MediaType's to return
for use in applications that support a variety of content types.
Consider appending MediaType.ALL at the end if destinations
are present which do not support any of the other default media types.
public List<MediaType> resolveMediaTypes(ServerWebExchange exchange)
RequestedContentTypeResolverresolveMediaTypes in interface RequestedContentTypeResolverexchange - the current exchangeRequestedContentTypeResolver.MEDIA_TYPE_ALL_LIST if none
were requested.