Package org.springframework.web.accept
@NullMarked
package org.springframework.web.accept
This package contains classes used to determine the requested the media types in a request.
ContentNegotiationStrategy is the main
abstraction for determining requested media types
with implementations based on a
a request parameter, the
'Accept' header, or a
default content type.
ContentNegotiationManager is used to delegate to one
ore more of the above strategies in a specific order.
-
ClassDescriptionBase class for
ContentNegotiationStrategyimplementations with the steps to resolve a request to media types.Central class to determine requested media types for a request.Factory to create aContentNegotiationManagerand configure it withContentNegotiationStrategyinstances.A strategy for resolving the requested media types for a request.AContentNegotiationStrategythat returns a fixed content type.AContentNegotiationStrategythat checks the 'Accept' request header.An implementation ofMediaTypeFileExtensionResolverthat maintains lookups between file extensions and MediaTypes in both directions.Strategy to resolve aMediaTypeto a list of file extensions — for example, to resolve "application/json" to "json".Strategy that resolves the requested content type from a query parameter.