类 CompositeWebMvcConfigurer
- 所有已实现的接口:
WebMvcConfigurer
- 作者:
- TODAY
2019-05-17 17:46
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddCorsMappings(CorsRegistry registry) Configure "global" cross-origin request processing.voidaddFormatters(cn.taketoday.format.FormatterRegistry registry) AddConvertersandFormattersin addition to the ones registered by default.voidaddInterceptors(InterceptorRegistry registry) Add MVC lifecycle interceptors for pre- and post-processing of controller method invocations and resource handler requests.voidaddResourceHandlers(ResourceHandlerRegistry registry) Configure staticResourcevoidaddViewControllers(ViewControllerRegistry registry) Configure simple automated controllers pre-configured with the response status code and/or a view to render the response body.voidaddWebMvcConfigurers(List<WebMvcConfigurer> configurers) voidconfigureAsyncSupport(AsyncSupportConfigurer configurer) Configure asynchronous request handling options.voidConfigure content negotiation options.voidOverride this method to configure "default" Servlet handling.voidConfigureHandlerExceptionHandlervoidconfigureHandlerRegistry(List<HandlerMapping> handlerRegistries) ConfigureHandlerMappingvoidconfigureMessageConverters(List<HttpMessageConverter<?>> converters) Configure theHttpMessageConverters for reading from the request body and for writing to the response body.voidconfigureParameterResolving(ParameterResolvingRegistry resolversRegistry, ParameterResolvingStrategies customizedStrategies) ConfigureParameterResolvingStrategyvoidconfigureParameterResolving(ParameterResolvingStrategies resolvingStrategies) ConfigureParameterResolvingStrategyvoidconfigurePathMatch(PathMatchConfigurer configurer) Help with configuringHandlerMappingpath matching options such as whether to use parsedPathPatternsor String pattern matching withPathMatcher, whether to match trailing slashes, and more.voidconfigureViewResolvers(ViewResolverRegistry registry) Configure view resolvers to translate String-based view names returned from controllers into concreteViewimplementations to perform rendering with.voidextendExceptionHandlers(List<HandlerExceptionHandler> handlers) Override this method to extend or modify the list ofHandlerExceptionHandlersafter it has been configured.voidextendMessageConverters(List<HttpMessageConverter<?>> converters) Extend or modify the list of converters after it has been, eitherconfiguredor initialized with a default list.cn.taketoday.validation.ValidatorProvide a customValidatorinstead of the one created by default.Get allWebMvcConfigurerbeansvoidConfigureReturnValueHandler
-
字段详细资料
-
webMvcConfigurers
-
-
构造器详细资料
-
CompositeWebMvcConfigurer
public CompositeWebMvcConfigurer() -
CompositeWebMvcConfigurer
-
-
方法详细资料
-
addWebMvcConfigurers
-
addResourceHandlers
从接口复制的说明:WebMvcConfigurerConfigure staticResource- 指定者:
addResourceHandlers在接口中WebMvcConfigurer- 参数:
registry-ResourceHandlerRegistry
-
configureParameterResolving
从接口复制的说明:WebMvcConfigurerConfigureParameterResolvingStrategy- 指定者:
configureParameterResolving在接口中WebMvcConfigurer- 参数:
resolvingStrategies-ParameterResolvingStrategyregistry
-
configureParameterResolving
public void configureParameterResolving(ParameterResolvingRegistry resolversRegistry, ParameterResolvingStrategies customizedStrategies) 从接口复制的说明:WebMvcConfigurerConfigureParameterResolvingStrategyuser can add
ParameterResolvingStrategytoresolvingStrategiesor useParameterResolvingRegistry.getCustomizedStrategies()or useParameterResolvingRegistry.getDefaultStrategies()- 指定者:
configureParameterResolving在接口中WebMvcConfigurercustomizedStrategies-ParameterResolvingStrategyregistry- 另请参阅:
-
modifyReturnValueHandlerManager
从接口复制的说明:WebMvcConfigurerConfigureReturnValueHandler- 指定者:
modifyReturnValueHandlerManager在接口中WebMvcConfigurer- 参数:
manager-ReturnValueHandlerregistry- 另请参阅:
-
configureDefaultServletHandling
Override this method to configure "default" Servlet handling. -
configureHandlerRegistry
从接口复制的说明:WebMvcConfigurerConfigureHandlerMapping- 指定者:
configureHandlerRegistry在接口中WebMvcConfigurer- 参数:
handlerRegistries-HandlerMappings
-
configureExceptionHandlers
从接口复制的说明:WebMvcConfigurerConfigureHandlerExceptionHandlerOverride this method to configure the list of
HandlerExceptionHandlersto use.Adding handlers to the list turns off the default resolvers that would otherwise be registered by default.
- 指定者:
configureExceptionHandlers在接口中WebMvcConfigurer- 参数:
handlers- a list to add exception handlers to (initially an empty list)
-
extendExceptionHandlers
从接口复制的说明:WebMvcConfigurerOverride this method to extend or modify the list ofHandlerExceptionHandlersafter it has been configured.This may be useful for example to allow default handlers to be registered and then insert a custom one through this method.
- 指定者:
extendExceptionHandlers在接口中WebMvcConfigurer- 参数:
handlers- the list of configured resolvers to extend.
-
configureContentNegotiation
从接口复制的说明:WebMvcConfigurerConfigure content negotiation options.- 指定者:
configureContentNegotiation在接口中WebMvcConfigurer
-
configureViewResolvers
从接口复制的说明:WebMvcConfigurerConfigure view resolvers to translate String-based view names returned from controllers into concreteViewimplementations to perform rendering with.- 指定者:
configureViewResolvers在接口中WebMvcConfigurer
-
configurePathMatch
从接口复制的说明:WebMvcConfigurerHelp with configuringHandlerMappingpath matching options such as whether to use parsedPathPatternsor String pattern matching withPathMatcher, whether to match trailing slashes, and more.- 指定者:
configurePathMatch在接口中WebMvcConfigurer- 另请参阅:
-
configureMessageConverters
从接口复制的说明:WebMvcConfigurerConfigure theHttpMessageConverters for reading from the request body and for writing to the response body.By default, all built-in converters are configured as long as the corresponding 3rd party libraries such Jackson JSON, JAXB2, and others are present on the classpath.
Note that use of this method turns off default converter registration. However, in a Infra application the
WebMvcAutoConfigurationadds anyHttpMessageConverterbeans as well as default converters. Hence, in a Infra application useHttpMessageConvertersAlternatively, for any scenario, useWebMvcConfigurer.extendMessageConverters(java.util.List)to modify the configured list of message converters.- 指定者:
configureMessageConverters在接口中WebMvcConfigurer- 参数:
converters- initially an empty list of converters
-
extendMessageConverters
从接口复制的说明:WebMvcConfigurerExtend or modify the list of converters after it has been, eitherconfiguredor initialized with a default list.Note that the order of converter registration is important. Especially in cases where clients accept
MediaType.ALLthe converters configured earlier will be preferred.- 指定者:
extendMessageConverters在接口中WebMvcConfigurer- 参数:
converters- the list of configured converters to be extended
-
addFormatters
public void addFormatters(cn.taketoday.format.FormatterRegistry registry) 从接口复制的说明:WebMvcConfigurerAddConvertersandFormattersin addition to the ones registered by default.- 指定者:
addFormatters在接口中WebMvcConfigurer
-
addCorsMappings
从接口复制的说明:WebMvcConfigurerConfigure "global" cross-origin request processing. The configured CORS mappings apply to annotated controllers, functional endpoints, and static resources.Annotated controllers can further declare more fine-grained config via
@CrossOrigin. In such cases "global" CORS configuration declared here iscombinedwith local CORS configuration defined on a controller method. -
addViewControllers
从接口复制的说明:WebMvcConfigurerConfigure simple automated controllers pre-configured with the response status code and/or a view to render the response body. This is useful in cases where there is no need for custom controller logic -- e.g. render a home page, perform simple site URL redirects, return a 404 status with HTML content, a 204 with no content, and more.- 指定者:
addViewControllers在接口中WebMvcConfigurer- 另请参阅:
-
addInterceptors
从接口复制的说明:WebMvcConfigurerAdd MVC lifecycle interceptors for pre- and post-processing of controller method invocations and resource handler requests. Interceptors can be registered to apply to all requests or be limited to a subset of URL patterns.- 指定者:
addInterceptors在接口中WebMvcConfigurer
-
getValidator
@Nullable public cn.taketoday.validation.Validator getValidator()从接口复制的说明:WebMvcConfigurerProvide a customValidatorinstead of the one created by default. The default implementation, assuming JSR-303 is on the classpath, is:OptionalValidatorFactoryBean. Leave the return value asnullto keep the default.- 指定者:
getValidator在接口中WebMvcConfigurer
-
configureAsyncSupport
从接口复制的说明:WebMvcConfigurerConfigure asynchronous request handling options.- 指定者:
configureAsyncSupport在接口中WebMvcConfigurer
-
getWebMvcConfigurations
Get allWebMvcConfigurerbeans
-