Annotation Interface EnableWebMvcExtension
@Retention(RUNTIME)
@Target(TYPE)
@Documented
@Import({WebMvcExtensionBeanDefinitionRegistrar.class,WebMvcExtensionConfiguration.class})
@EnableWebExtension
public @interface EnableWebMvcExtension
Enable annotation to extend the features of Spring WebMVC
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
EnableWebMvcEnableWebExtensionWebMvcExtensionBeanDefinitionRegistrarWebMvcExtensionConfiguration
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends org.springframework.web.servlet.HandlerInterceptor>[]SpecifyHandlerInterceptortypes or its inherited types as Spring beans and then register intoInterceptorRegistry.booleanIndicate whether Spring WebHandlerMethodshould be intercepted.booleanIndicate whether it publishes the Spring Web extension events:HandlerMethodArgumentsResolvedEvent(if enabled)WebEndpointMappingsReadyEvent(if enabled)booleanIndicate whether theInterceptorRegistryregisters the beans ofHandlerInterceptor.booleanIndicate whether The Spring Web registers the instances ofWebEndpointMappingthat source from Spring WebMVC, Spring WebFlux or Classical Servlet.io.microsphere.spring.web.util.RequestContextStrategyIndicate where theRequestAttributesstores.booleanIndicate whether theReversedProxyHandlerMappingis enabled or not.booleanIndicate thatRequestAttributesstores theargumentofHandlerMethodthat annotatedRequestBodybooleanIndicate thatRequestAttributesstores the return value ofHandlerMethodbefore write as theResponseBody
-
Element Details
-
registerWebEndpointMappings
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean registerWebEndpointMappingsIndicate whether The Spring Web registers the instances ofWebEndpointMappingthat source from Spring WebMVC, Spring WebFlux or Classical Servlet.- Returns:
trueas default- See Also:
-
WebEndpointMappingWebEndpointMappingResolverWebEndpointMappingRegistryWebEndpointMappingFactoryWebEndpointMappingFilter
- Default:
- true
-
interceptHandlerMethods
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean interceptHandlerMethodsIndicate whether Spring WebHandlerMethodshould be intercepted. Iftrue,HandlerMethodArgumentInterceptorandHandlerMethodInterceptorbeans will be initialized and then be invoked aroundHandlerMethodbeing executed.- Returns:
trueas default- See Also:
-
HandlerMethodArgumentInterceptorHandlerMethodInterceptor
- Default:
- true
-
publishEvents
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean publishEventsIndicate whether it publishes the Spring Web extension events:HandlerMethodArgumentsResolvedEvent(if enabled)WebEndpointMappingsReadyEvent(if enabled)
- Returns:
trueas default- See Also:
-
WebEventPublisherWebEndpointMappingsReadyEventHandlerMethodArgumentsResolvedEvent
- Default:
- true
-
requestContextStrategy
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) io.microsphere.spring.web.util.RequestContextStrategy requestContextStrategyIndicate where theRequestAttributesstores.- Returns:
RequestContextStrategy.DEFAULTas default- See Also:
-
RequestAttributesRequestContextHolderRequestContextFilterRequestContextListenerFrameworkServlet.initContextHolders(HttpServletRequest, LocaleContext, RequestAttributes)RequestContextStrategy
- Default:
- DEFAULT
-
registerHandlerInterceptors
boolean registerHandlerInterceptorsIndicate whether theInterceptorRegistryregisters the beans ofHandlerInterceptor. If it specifiestrue,handlerInterceptors()method will not work anymore.- Returns:
falseas default- See Also:
-
WebMvcConfigurer.addInterceptors(InterceptorRegistry)InterceptorRegistry
- Default:
- false
-
handlerInterceptors
Class<? extends org.springframework.web.servlet.HandlerInterceptor>[] handlerInterceptorsSpecifyHandlerInterceptortypes or its inherited types as Spring beans and then register intoInterceptorRegistry.If
registerHandlerInterceptors()istrue, specified types will be ignored.- Returns:
nullas default- See Also:
-
WebMvcConfigurer.addInterceptors(InterceptorRegistry)InterceptorRegistry
- Default:
- {}
-
storeRequestBodyArgument
boolean storeRequestBodyArgumentIndicate thatRequestAttributesstores theargumentofHandlerMethodthat annotatedRequestBody- Returns:
falseas default- See Also:
-
RequestBodyStoringRequestBodyArgumentAdviceHandlerMethodWebMvcUtils.getHandlerMethodRequestBodyArgument(HttpServletRequest, Method)RequestAttributesUtils.getHandlerMethodRequestBodyArgument(RequestAttributes, HandlerMethod)
- Default:
- false
-
storeResponseBodyReturnValue
boolean storeResponseBodyReturnValueIndicate thatRequestAttributesstores the return value ofHandlerMethodbefore write as theResponseBody- Returns:
falseas default- See Also:
-
ResponseBodyWebMvcUtils.getHandlerMethodReturnValue(HttpServletRequest, Method)RequestAttributesUtils.getHandlerMethodReturnValue(RequestAttributes, HandlerMethod)
- Default:
- false
-
reversedProxyHandlerMapping
boolean reversedProxyHandlerMappingIndicate whether theReversedProxyHandlerMappingis enabled or not.- Returns:
falseas default- See Also:
- Default:
- false
-