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 ContentNegotiationConfigurerContentNegotiationConfigurer. defaultContentType(MediaType... defaultContentTypes)Set the default content type(s) to use when no content type is requested in order of priority.ContentNegotiationConfigurerContentNegotiationConfigurer. defaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy)Set a customContentNegotiationStrategyto use to determine the content type to use when no content type is requested.ContentNegotiationConfigurerContentNegotiationConfigurer. favorParameter(boolean favorParameter)Whether a request parameter ("format" by default) should be used to determine the requested media type.ContentNegotiationConfigurerContentNegotiationConfigurer. favorPathExtension(boolean favorPathExtension)Deprecated.as of 5.2.4.ContentNegotiationConfigurerContentNegotiationConfigurer. ignoreAcceptHeader(boolean ignoreAcceptHeader)Whether to disable checking the 'Accept' request header.ContentNegotiationConfigurerContentNegotiationConfigurer. ignoreUnknownPathExtensions(boolean ignore)Deprecated.as of 5.2.4.ContentNegotiationConfigurerContentNegotiationConfigurer. mediaType(String extension, MediaType mediaType)Add a mapping from a key, extracted from a path extension or a query parameter, to a MediaType.ContentNegotiationConfigurerContentNegotiationConfigurer. mediaTypes(Map<String,MediaType> mediaTypes)An alternative tomediaType(java.lang.String, org.springframework.http.MediaType).ContentNegotiationConfigurerContentNegotiationConfigurer. parameterName(String parameterName)Set the query parameter name to use whenfavorParameter(boolean)is on.ContentNegotiationConfigurerContentNegotiationConfigurer. replaceMediaTypes(Map<String,MediaType> mediaTypes)Similar tomediaType(java.lang.String, org.springframework.http.MediaType)but for replacing existing mappings.ContentNegotiationConfigurerContentNegotiationConfigurer. useJaf(boolean useJaf)Deprecated.as of 5.0, in favor ofuseRegisteredExtensionsOnly(boolean)which has reverse behaviorContentNegotiationConfigurerContentNegotiationConfigurer. useRegisteredExtensionsOnly(boolean useRegisteredExtensionsOnly)WhenfavorPathExtensionis set, this property determines whether to use only registeredMediaTypemappings 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 voidDelegatingWebMvcConfiguration. configureContentNegotiation(ContentNegotiationConfigurer configurer)protected voidWebMvcConfigurationSupport. configureContentNegotiation(ContentNegotiationConfigurer configurer)Override this method to configure content negotiation.default voidWebMvcConfigurer. configureContentNegotiation(ContentNegotiationConfigurer configurer)Configure content negotiation options.voidWebMvcConfigurerAdapter. configureContentNegotiation(ContentNegotiationConfigurer configurer)Deprecated.Configure content negotiation options.