Class SpringHandlerDefinitionEnhancer

java.lang.Object
org.axonframework.extension.spring.config.annotation.SpringHandlerDefinitionEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

public class SpringHandlerDefinitionEnhancer extends Object implements 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