# Uses of Class
org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer

Packages that use ContentNegotiationConfigurer
Package
Description
org.springframework.web.servlet.config.annotation
Annotation-based setup for Spring MVC.

## Uses of ContentNegotiationConfigurer in org.springframework.web.servlet.config.annotation

Methods in org.springframework.web.servlet.config.annotation that return ContentNegotiationConfigurer
Modifier and Type
Method
Description
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`defaultContentType(org.springframework.http.MediaType... defaultContentTypes)`
Set the default content type(s) to use when no content type is requested in order of priority.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`defaultContentTypeStrategy(org.springframework.web.accept.ContentNegotiationStrategy defaultStrategy)`
Set a custom `ContentNegotiationStrategy` to use to determine the content type to use when no content type is requested.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`favorParameter(boolean favorParameter)`
Whether a request parameter ("format" by default) should be used to determine the requested media type.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`favorPathExtension(boolean favorPathExtension)`
Deprecated.
as of 5.2.4.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`ignoreAcceptHeader(boolean ignoreAcceptHeader)`
Whether to disable checking the 'Accept' request header.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`ignoreUnknownPathExtensions(boolean ignore)`
Deprecated.
as of 5.2.4.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`mediaType(String extension, org.springframework.http.MediaType mediaType)`
Add a mapping from a key, extracted from a path extension or a query parameter, to a MediaType.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`mediaTypes(Map<String,org.springframework.http.MediaType> mediaTypes)`
An alternative to `mediaType(java.lang.String, org.springframework.http.MediaType)`.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`parameterName(String parameterName)`
Set the query parameter name to use when `favorParameter(boolean)` is on.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`replaceMediaTypes(Map<String,org.springframework.http.MediaType> mediaTypes)`
Similar to `mediaType(java.lang.String, org.springframework.http.MediaType)` but for replacing existing mappings.
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`useJaf(boolean useJaf)`
Deprecated.
as of 5.0, in favor of `useRegisteredExtensionsOnly(boolean)` which has reverse behavior
`ContentNegotiationConfigurer`
ContentNegotiationConfigurer.`useRegisteredExtensionsOnly(boolean useRegisteredExtensionsOnly)`
When `favorPathExtension` is set, this property determines whether to use only registered `MediaType` mappings to resolve a path extension to a specific MediaType.
Methods in org.springframework.web.servlet.config.annotation with parameters of type ContentNegotiationConfigurer
Modifier and Type
Method
Description
`protected void`
DelegatingWebMvcConfiguration.`configureContentNegotiation(ContentNegotiationConfigurer configurer)`
`protected void`
WebMvcConfigurationSupport.`configureContentNegotiation(ContentNegotiationConfigurer configurer)`
Override this method to configure content negotiation.
`default void`
WebMvcConfigurer.`configureContentNegotiation(ContentNegotiationConfigurer configurer)`
Configure content negotiation options.