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 ElementsModifier and TypeOptional ElementDescriptionClass<? extends org.springframework.web.servlet.HandlerInterceptor>[]
SpecifyHandlerInterceptor
types or its inherited types to register intoInterceptorRegistry
.boolean
Indicate whether Spring WebHandlerMethod
should be intercepted.boolean
Indicate whether it publishes the Spring Web extension events:HandlerMethodArgumentsResolvedEvent
(if enabled
)WebEndpointMappingsReadyEvent
(if enabled
)boolean
Indicate whether theInterceptorRegistry
registers the beans ofHandlerInterceptor
.boolean
Indicate whether The Spring Web registers the instances ofWebEndpointMapping
that source from Spring WebMVC, Spring WebFlux or Classical Servlet.boolean
Indicate that Stores theargument
ofHandlerMethod
that annotatedRequestBody
boolean
Stores the return value ofHandlerMethod
before write as theResponseBody
-
Element Details
-
registerWebEndpointMappings
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean registerWebEndpointMappingsIndicate whether The Spring Web registers the instances ofWebEndpointMapping
that source from Spring WebMVC, Spring WebFlux or Classical Servlet.- Returns:
true
as default- See Also:
- Default:
- true
-
interceptHandlerMethods
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean interceptHandlerMethodsIndicate whether Spring WebHandlerMethod
should be intercepted. Iftrue
,HandlerMethodArgumentInterceptor
andHandlerMethodInterceptor
beans will be initialized and then be invoked aroundHandlerMethod
being executed.- Returns:
true
as default- See Also:
- Default:
- true
-
publishEvents
@AliasFor(annotation=io.microsphere.spring.web.annotation.EnableWebExtension.class) boolean publishEventsIndicate whether it publishes the Spring Web extension events:- Returns:
true
as default- See Also:
- Default:
- true
-
registerHandlerInterceptors
boolean registerHandlerInterceptorsIndicate whether theInterceptorRegistry
registers the beans ofHandlerInterceptor
. If it specifiestrue
,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>[] handlerInterceptorsSpecifyHandlerInterceptor
types or its inherited types to register intoInterceptorRegistry
. IfregisterHandlerInterceptors()
istrue
, specified types will be ignored.- Returns:
null
as default- See Also:
-
WebMvcConfigurer.addInterceptors(InterceptorRegistry)
InterceptorRegistry
- Default:
- {}
-
storeRequestBodyArgument
boolean storeRequestBodyArgumentIndicate that Stores theargument
ofHandlerMethod
that annotatedRequestBody
- Returns:
false
as default- See Also:
-
RequestBody
StoringRequestBodyArgumentAdvice
HandlerMethod
- Default:
- false
-
storeResponseBodyReturnValue
boolean storeResponseBodyReturnValueStores the return value ofHandlerMethod
before write as theResponseBody
- Returns:
false
as default- See Also:
-
ResponseBody
- Default:
- false
-