Package | Description |
---|---|
org.springframework.web.accept |
This package contains classes used to determine the requested the media types in a request.
|
org.springframework.web.servlet.config.annotation |
Annotation-based setup for Spring MVC.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractMappingContentNegotiationStrategy
Base class for
ContentNegotiationStrategy implementations with the
steps to resolve a request to media types. |
class |
ContentNegotiationManager
Central class to determine requested media types
for a request.
|
class |
FixedContentNegotiationStrategy
A
ContentNegotiationStrategy that returns a fixed content type. |
class |
HeaderContentNegotiationStrategy
A
ContentNegotiationStrategy that checks the 'Accept' request header. |
class |
ParameterContentNegotiationStrategy
Strategy that resolves the requested content type from a query parameter.
|
class |
PathExtensionContentNegotiationStrategy
A
ContentNegotiationStrategy that resolves the file extension in the
request path to a key to be used to look up a media type. |
class |
ServletPathExtensionContentNegotiationStrategy
Extends
PathExtensionContentNegotiationStrategy that also uses
ServletContext.getMimeType(String) to resolve file extensions. |
Modifier and Type | Method and Description |
---|---|
<T extends ContentNegotiationStrategy> |
ContentNegotiationManager.getStrategy(java.lang.Class<T> strategyType)
Find a
ContentNegotiationStrategy of the given type. |
Modifier and Type | Method and Description |
---|---|
java.util.List<ContentNegotiationStrategy> |
ContentNegotiationManager.getStrategies()
Return the configured content negotiation strategies.
|
Modifier and Type | Method and Description |
---|---|
void |
ContentNegotiationManagerFactoryBean.setDefaultContentTypeStrategy(ContentNegotiationStrategy strategy)
Set a custom
ContentNegotiationStrategy to use to determine
the content type to use when no content type is requested. |
Modifier and Type | Method and Description |
---|---|
void |
ContentNegotiationManagerFactoryBean.setStrategies(java.util.List<ContentNegotiationStrategy> strategies)
Set the exact list of strategies to use.
|
Constructor and Description |
---|
ContentNegotiationManager(ContentNegotiationStrategy... strategies)
Create an instance with the given list of
ContentNegotiationStrategy strategies each of which may also be
an instance of MediaTypeFileExtensionResolver . |
Constructor and Description |
---|
ContentNegotiationManager(java.util.Collection<ContentNegotiationStrategy> strategies)
A collection-based alternative to
ContentNegotiationManager.ContentNegotiationManager(ContentNegotiationStrategy...) . |
Modifier and Type | Method and Description |
---|---|
ContentNegotiationConfigurer |
ContentNegotiationConfigurer.defaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy)
Set a custom
ContentNegotiationStrategy to use to determine
the content type to use when no content type is requested. |
Modifier and Type | Method and Description |
---|---|
void |
ContentNegotiationConfigurer.strategies(java.util.List<ContentNegotiationStrategy> strategies)
Set the exact list of strategies to use.
|