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:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends org.springframework.web.servlet.HandlerInterceptor>[]
    Specify HandlerInterceptor types or its inherited types as Spring beans and then register into InterceptorRegistry.
    boolean
    Indicate whether Spring Web HandlerMethod should be intercepted.
    boolean
    Indicate whether it publishes the Spring Web extension events: HandlerMethodArgumentsResolvedEvent(if enabled) WebEndpointMappingsReadyEvent(if enabled)
    boolean
    Indicate whether the InterceptorRegistry registers the beans of HandlerInterceptor.
    boolean
    Indicate whether The Spring Web registers the instances of WebEndpointMapping that source from Spring WebMVC, Spring WebFlux or Classical Servlet.
    io.microsphere.spring.web.util.RequestContextStrategy
    Indicate where the RequestAttributes stores.
    boolean
    Indicate whether the ReversedProxyHandlerMapping is enabled or not.
    boolean
    Indicate that RequestAttributes stores the argument of HandlerMethod that annotated RequestBody
    boolean
    Indicate that RequestAttributes stores the return value of HandlerMethod before write as the ResponseBody
  • Element Details

    • registerWebEndpointMappings

      @AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean registerWebEndpointMappings
      Indicate whether The Spring Web registers the instances of WebEndpointMapping that source from Spring WebMVC, Spring WebFlux or Classical Servlet.
      Returns:
      true as default
      See Also:
      • WebEndpointMapping
      • WebEndpointMappingResolver
      • WebEndpointMappingRegistry
      • WebEndpointMappingFactory
      • WebEndpointMappingFilter
      Default:
      true
    • interceptHandlerMethods

      @AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean interceptHandlerMethods
      Indicate whether Spring Web HandlerMethod should be intercepted. If true, HandlerMethodArgumentInterceptor and HandlerMethodInterceptor beans will be initialized and then be invoked around HandlerMethod being executed.
      Returns:
      true as default
      See Also:
      • HandlerMethodArgumentInterceptor
      • HandlerMethodInterceptor
      Default:
      true
    • publishEvents

      @AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean publishEvents
      Indicate whether it publishes the Spring Web extension events:
      • HandlerMethodArgumentsResolvedEvent(if enabled)
      • WebEndpointMappingsReadyEvent(if enabled)
      Returns:
      true as default
      See Also:
      • WebEventPublisher
      • WebEndpointMappingsReadyEvent
      • HandlerMethodArgumentsResolvedEvent
      Default:
      true
    • requestContextStrategy

      @AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) io.microsphere.spring.web.util.RequestContextStrategy requestContextStrategy
      Indicate where the RequestAttributes stores.
      Returns:
      RequestContextStrategy.DEFAULT as default
      See Also:
      • RequestAttributes
      • RequestContextHolder
      • RequestContextFilter
      • RequestContextListener
      • FrameworkServlet.initContextHolders(HttpServletRequest, LocaleContext, RequestAttributes)
      • RequestContextStrategy
      Default:
      DEFAULT
    • registerHandlerInterceptors

      boolean registerHandlerInterceptors
      Indicate whether the InterceptorRegistry registers the beans of HandlerInterceptor. If it specifies true, handlerInterceptors() method will not work anymore.
      Returns:
      false as default
      See Also:
      • WebMvcConfigurer.addInterceptors(InterceptorRegistry)
      • InterceptorRegistry
      Default:
      false
    • handlerInterceptors

      Class<? extends org.springframework.web.servlet.HandlerInterceptor>[] handlerInterceptors
      Specify HandlerInterceptor types or its inherited types as Spring beans and then register into InterceptorRegistry.

      If registerHandlerInterceptors() is true, specified types will be ignored.

      Returns:
      null as default
      See Also:
      • WebMvcConfigurer.addInterceptors(InterceptorRegistry)
      • InterceptorRegistry
      Default:
      {}
    • storeRequestBodyArgument

      boolean storeRequestBodyArgument
      Indicate that RequestAttributes stores the argument of HandlerMethod that annotated RequestBody
      Returns:
      false as default
      See Also:
      Default:
      false
    • storeResponseBodyReturnValue

      boolean storeResponseBodyReturnValue
      Indicate that RequestAttributes stores the return value of HandlerMethod before write as the ResponseBody
      Returns:
      false as default
      See Also:
      Default:
      false
    • reversedProxyHandlerMapping

      boolean reversedProxyHandlerMapping
      Indicate whether the ReversedProxyHandlerMapping is enabled or not.
      Returns:
      false as default
      See Also:
      Default:
      false