open class ContentNegotiationManager : ContentNegotiationStrategy, MediaTypeFileExtensionResolver
Central class to determine requested MediaType for a request. This is done by delegating to a list of configured Also provides methods to look up file extensions for a media type. This is done by delegating to the list of configured |
|
open class ContentNegotiationManagerFactoryBean : FactoryBean<ContentNegotiationManager>, ServletContextAware, InitializingBean
Factory to create a As of 5.0 you can set the exact strategies to use via As an alternative you can also rely on the set of defaults described below which can be turned on or off or customized through the methods of this builder: Property Setter Underlying Strategy Default Setting#setFavorPathExtension PathExtensionContentNegotiationStrategy On favorParameter ParameterContentNegotiationStrategy Off ignoreAcceptHeader HeaderContentNegotiationStrategy On defaultContentType FixedContentNegotiationStrategy Not set defaultContentTypeStrategy ContentNegotiationStrategy Not set Note: if you must use URL-based content type resolution, the use of a query parameter is simpler and preferable to the use of a path extension since the latter can cause issues with URI variables, path parameters, and URI decoding. Consider setting #setFavorPathExtension to false or otherwise set the strategies to use explicitly via #setStrategies(List) .
|
|
open class FixedContentNegotiationStrategy : ContentNegotiationStrategy
A |
|
open class HeaderContentNegotiationStrategy : ContentNegotiationStrategy
A |
|
open class ParameterContentNegotiationStrategy : AbstractMappingContentNegotiationStrategy
Strategy that resolves the requested content type from a query parameter. The default query parameter name is "format". You can register static mappings between keys (i.e. the expected value of the query parameter) and MediaType's via |
|
open class PathExtensionContentNegotiationStrategy : AbstractMappingContentNegotiationStrategy
A If the file extension is not found in the explicit registrations provided to the constructor, the MediaTypeFactory is used as a fallback mechanism. |
|
open class ServletPathExtensionContentNegotiationStrategy : PathExtensionContentNegotiationStrategy
Extends |