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(MediaType... defaultContentTypes)
Set the default content type(s) to use when no content type is requested in order of priority.ContentNegotiationConfigurer
ContentNegotiationConfigurer. defaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy)
Set a customContentNegotiationStrategy
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, 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,MediaType> mediaTypes)
An alternative tomediaType(java.lang.String, org.springframework.http.MediaType)
.ContentNegotiationConfigurer
ContentNegotiationConfigurer. parameterName(String parameterName)
Set the query parameter name to use whenfavorParameter(boolean)
is on.ContentNegotiationConfigurer
ContentNegotiationConfigurer. replaceMediaTypes(Map<String,MediaType> mediaTypes)
Similar tomediaType(java.lang.String, org.springframework.http.MediaType)
but for replacing existing mappings.ContentNegotiationConfigurer
ContentNegotiationConfigurer. useJaf(boolean useJaf)
Deprecated.as of 5.0, in favor ofuseRegisteredExtensionsOnly(boolean)
which has reverse behaviorContentNegotiationConfigurer
ContentNegotiationConfigurer. useRegisteredExtensionsOnly(boolean useRegisteredExtensionsOnly)
WhenfavorPathExtension
is set, this property determines whether to use only registeredMediaType
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.void
WebMvcConfigurerAdapter. configureContentNegotiation(ContentNegotiationConfigurer configurer)
Deprecated.Configure content negotiation options.