Annotation Interface EnableEventExtension
@Target({TYPE,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Import(io.microsphere.spring.context.event.EventExtensionRegistrar.class)
public @interface EnableEventExtension
Enables Spring's Event Extension.
Example Usage
@EnableEventExtension(intercepted = true, executorForListener = "myExecutor")
public class MyConfig {
// Configuration beans
}
This annotation enables advanced event handling features in Spring, such as event interception
and asynchronous listener execution. It imports the EventExtensionRegistrar
to register
necessary infrastructure beans.
- Since:
- 1.0.0
- Author:
- Mercy
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionA qualifier value for the asynchronous listening ofApplicationListeners
.boolean
TheApplicationEvents
andApplicationListeners
should be intercepted byApplicationEventInterceptor
andApplicationListenerInterceptor
respectively or not. -
Field Summary
Fields
-
Field Details
-
NO_EXECUTOR
NoExecutor
Present- See Also:
-
-
Element Details
-
intercepted
boolean interceptedTheApplicationEvents
andApplicationListeners
should be intercepted byApplicationEventInterceptor
andApplicationListenerInterceptor
respectively or not.- Returns:
InterceptingApplicationEventMulticaster
will beinitialized
by the SpringApplicationContext
iftrue
. The default value istrue
.- See Also:
- Default:
- true
-
executorForListener
String executorForListenerA qualifier value for the asynchronous listening ofApplicationListeners
.- Returns:
- the qualifier value (or the bean name) of a specific Executor or TaskExecutor bean definition. The default value is an empty string indicates no Executor or TaskExecutor used.
- Default:
- "N/E"
-