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
Deprecated.
as of 5.2.4. See class-level note in
ContentNegotiationManagerFactoryBean on the deprecation of path
extension config options. |
class |
ServletPathExtensionContentNegotiationStrategy
Deprecated.
as of 5.2.4. See class-level note in
ContentNegotiationManagerFactoryBean on the deprecation of path
extension config options. |
Modifier and Type | Method and Description |
---|---|
<T extends ContentNegotiationStrategy> |
ContentNegotiationManager.getStrategy(Class<T> strategyType)
Find a
ContentNegotiationStrategy of the given type. |
Modifier and Type | Method and Description |
---|---|
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(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(Collection<ContentNegotiationStrategy> strategies)
A collection-based alternative to
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(List<ContentNegotiationStrategy> strategies)
Set the exact list of strategies to use.
|