Class ClasspathHandlerDefinitionConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
ConfigurationEnhancer that registers the ClasspathHandlerDefinition as the default
HandlerDefinition, and the ClasspathHandlerEnhancerDefinition as the default
HandlerEnhancerDefinition.
Any HandlerDefinition or HandlerEnhancerDefinition registered separately, for example through
ComponentRegistry.registerComponent(Class, org.axonframework.common.configuration.ComponentBuilder) or an
injectable bean, is composed with these classpath-discovered defaults rather than replacing them, through
HandlerDefinitionUtils.registerToComponentRegistry(ComponentRegistry, java.util.function.Function) and
HandlerEnhancerDefinitionUtils.registerToComponentRegistry(ComponentRegistry, java.util.function.Function).
Registered once at the root and not re-invoked in child module registries. The HandlerDefinition and
HandlerEnhancerDefinition components are resolved through the parent chain, so nested modules reuse the
root's classpath-discovered defaults. Re-invoking per nesting level would compose the classpath enhancer set into
the resolved HandlerDefinition once per level (the flatten in MultiHandlerEnhancerDefinition
does not de-duplicate), inflating the enhancer list and applying every enhancer once per level.
- Since:
- 5.3.2
- Author:
- Steven van Beelen
-
Constructor Details
-
ClasspathHandlerDefinitionConfigurationEnhancer
public ClasspathHandlerDefinitionConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
componentRegistry- The registry instance to enhance.
-