类的使用
org.springframework.web.accept.ContentNegotiationManager
使用ContentNegotiationManager的程序包 程序包 说明 org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilder
implementations.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.org.springframework.web.servlet.mvc.condition Common MVC logic for matching incoming requests based on conditions.org.springframework.web.servlet.mvc.method Servlet-based infrastructure for handler method processing, building on theorg.springframework.web.method
package.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotation
package.org.springframework.web.servlet.resource Support classes for serving static resources.org.springframework.web.servlet.view Provides standard View and ViewResolver implementations, including abstract base classes for custom implementations.org.springframework.test.web.servlet.setup中ContentNegotiationManager的使用
参数类型为ContentNegotiationManager的org.springframework.test.web.servlet.setup中的方法 修饰符和类型 方法 说明 StandaloneMockMvcBuilder
StandaloneMockMvcBuilder. setContentNegotiationManager(ContentNegotiationManager manager)
Set a ContentNegotiationManager.org.springframework.web.accept中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.accept中的方法 修饰符和类型 方法 说明 ContentNegotiationManager
ContentNegotiationManagerFactoryBean. build()
Create and initialize aContentNegotiationManager
instance.ContentNegotiationManager
ContentNegotiationManagerFactoryBean. getObject()
org.springframework.web.servlet.config.annotation中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.servlet.config.annotation中的方法 修饰符和类型 方法 说明 protected ContentNegotiationManager
ContentNegotiationConfigurer. buildContentNegotiationManager()
Build aContentNegotiationManager
based on this configurer's settings.ContentNegotiationManager
WebMvcConfigurationSupport. mvcContentNegotiationManager()
Return aContentNegotiationManager
instance to use to determine requested media types in a given request.参数类型为ContentNegotiationManager的org.springframework.web.servlet.config.annotation中的构造器 构造器 说明 ResourceHandlerRegistry(ApplicationContext applicationContext, ServletContext servletContext, ContentNegotiationManager contentNegotiationManager)
Create a new resource handler registry for the given application context.ResourceHandlerRegistry(ApplicationContext applicationContext, ServletContext servletContext, ContentNegotiationManager contentNegotiationManager, UrlPathHelper pathHelper)
A variant ofResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager)
that also accepts theUrlPathHelper
used for mapping requests to static resources.ViewResolverRegistry(ContentNegotiationManager contentNegotiationManager, ApplicationContext context)
Class constructor withContentNegotiationManager
andApplicationContext
.org.springframework.web.servlet.mvc.condition中ContentNegotiationManager的使用
参数类型为ContentNegotiationManager的org.springframework.web.servlet.mvc.condition中的构造器 构造器 说明 ProducesRequestCondition(String[] produces, String[] headers, ContentNegotiationManager manager)
Same asProducesRequestCondition(String[], String[])
but also accepting aContentNegotiationManager
.org.springframework.web.servlet.mvc.method中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.servlet.mvc.method中的方法 修饰符和类型 方法 说明 ContentNegotiationManager
RequestMappingInfo.BuilderConfiguration. getContentNegotiationManager()
Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.参数类型为ContentNegotiationManager的org.springframework.web.servlet.mvc.method中的方法 修饰符和类型 方法 说明 void
RequestMappingInfo.BuilderConfiguration. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set the ContentNegotiationManager to use for the ProducesRequestCondition.org.springframework.web.servlet.mvc.method.annotation中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 ContentNegotiationManager
ExceptionHandlerExceptionResolver. getContentNegotiationManager()
Return the configuredContentNegotiationManager
.ContentNegotiationManager
RequestMappingHandlerMapping. getContentNegotiationManager()
Return the configuredContentNegotiationManager
.参数类型为ContentNegotiationManager的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 void
ExceptionHandlerExceptionResolver. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set theContentNegotiationManager
to use to determine requested media types.void
RequestMappingHandlerAdapter. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set theContentNegotiationManager
to use to determine requested media types.void
RequestMappingHandlerMapping. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set theContentNegotiationManager
to use to determine requested media types.参数类型为ContentNegotiationManager的org.springframework.web.servlet.mvc.method.annotation中的构造器 构造器 说明 AbstractMessageConverterMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager contentNegotiationManager)
Constructor with list of converters and ContentNegotiationManager.AbstractMessageConverterMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice)
Constructor with list of converters and ContentNegotiationManager as well as request/response body advice instances.HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager)
Basic constructor with converters andContentNegotiationManager
.HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice)
Complete constructor for resolvingHttpEntity
and handlingResponseEntity
.RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager)
Basic constructor with converters andContentNegotiationManager
.RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice)
Complete constructor for resolving@RequestBody
and handling@ResponseBody
.ResponseBodyEmitterReturnValueHandler(List<HttpMessageConverter<?>> messageConverters, ReactiveAdapterRegistry registry, TaskExecutor executor, ContentNegotiationManager manager)
Complete constructor with pluggable "reactive" type support.org.springframework.web.servlet.resource中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 ContentNegotiationManager
ResourceHttpRequestHandler. getContentNegotiationManager()
已过时。as of 5.2.4.参数类型为ContentNegotiationManager的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 void
ResourceHttpRequestHandler. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
已过时。as of 5.2.4 in favor of usingResourceHttpRequestHandler.setMediaTypes(Map)
with mappings possibly obtained fromgetMediaTypeMappings()
.org.springframework.web.servlet.view中ContentNegotiationManager的使用
返回ContentNegotiationManager的org.springframework.web.servlet.view中的方法 修饰符和类型 方法 说明 ContentNegotiationManager
ContentNegotiatingViewResolver. getContentNegotiationManager()
Return theContentNegotiationManager
to use to determine requested media types.参数类型为ContentNegotiationManager的org.springframework.web.servlet.view中的方法 修饰符和类型 方法 说明 void
ContentNegotiatingViewResolver. setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set theContentNegotiationManager
to use to determine requested media types.