Class SpringHandlerDefinitionEnhancer
java.lang.Object
org.axonframework.extension.spring.config.annotation.SpringHandlerDefinitionEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
ConfigurationEnhancer that composes HandlerDefinition and HandlerEnhancerDefinition beans
from a Spring ApplicationContext into the ComponentRegistry.
This enhancer is picked up automatically by
SpringComponentRegistry, alongside classpath/
ServiceLoader-discovered ConfigurationEnhancers such as the one seeding the default,
classpath-discovered HandlerDefinition and HandlerEnhancerDefinition. Both compose into the same
ComponentRegistry component through
HandlerDefinitionUtils.registerToComponentRegistry(ComponentRegistry, java.util.function.Function) and
HandlerEnhancerDefinitionUtils.registerToComponentRegistry(ComponentRegistry, java.util.function.Function),
so every framework-managed, annotation-based handler inspection sees the same, single composition, regardless of
whether it runs in a Spring or plain-Java application.
- Since:
- 4.6.0
- Author:
- Allard Buijze, Steven van Beelen
-
Constructor Summary
ConstructorsConstructorDescriptionSpringHandlerDefinitionEnhancer(List<HandlerDefinition> handlerDefinitions, List<HandlerEnhancerDefinition> handlerEnhancerDefinitions) Constructs aSpringHandlerDefinitionEnhancercomposing the givenhandlerDefinitionsandhandlerEnhancerDefinitions, typically allHandlerDefinitionandHandlerEnhancerDefinitionbeans available in a SpringApplicationContext. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.common.configuration.ConfigurationEnhancer
order
-
Constructor Details
-
SpringHandlerDefinitionEnhancer
public SpringHandlerDefinitionEnhancer(List<HandlerDefinition> handlerDefinitions, List<HandlerEnhancerDefinition> handlerEnhancerDefinitions) Constructs aSpringHandlerDefinitionEnhancercomposing the givenhandlerDefinitionsandhandlerEnhancerDefinitions, typically allHandlerDefinitionandHandlerEnhancerDefinitionbeans available in a SpringApplicationContext.- Parameters:
handlerDefinitions- theHandlerDefinitionbeans to compose into theComponentRegistryhandlerEnhancerDefinitions- theHandlerEnhancerDefinitionbeans to compose into theComponentRegistry
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
componentRegistry- The registry instance to enhance.
-