Package org.axonframework.spring.config
Class SpringAggregateLookup
java.lang.Object
org.axonframework.spring.config.SpringAggregateLookup
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
public class SpringAggregateLookup
extends Object
implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
A
BeanDefinitionRegistryPostProcessor implementation that scans for Aggregate types and registers a
configurer for each Aggregate found.- Since:
- 4.6.0
- Author:
- Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> Map<org.axonframework.spring.config.SpringAggregateLookup.SpringAggregate<? super A>, Map<Class<? extends A>, String>> buildAggregateHierarchy(org.springframework.beans.factory.ListableBeanFactory beanFactory, String[] aggregatePrototypes) Builds a hierarchy model from the givenaggregatePrototypesfound in the givenbeanFactory.voidpostProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
SpringAggregateLookup
public SpringAggregateLookup()
-
-
Method Details
-
buildAggregateHierarchy
public static <A> Map<org.axonframework.spring.config.SpringAggregateLookup.SpringAggregate<? super A>,Map<Class<? extends A>, buildAggregateHierarchyString>> (org.springframework.beans.factory.ListableBeanFactory beanFactory, String[] aggregatePrototypes) Builds a hierarchy model from the givenaggregatePrototypesfound in the givenbeanFactory.- Type Parameters:
A- The type of Aggregate.- Parameters:
beanFactory- The beanFactory containing the definitions of the Aggregates.aggregatePrototypes- The prototype beans found for each individual type of Aggregate.- Returns:
- A hierarchy model with subtypes for each declared main Aggregate.
-
postProcessBeanFactory
public void postProcessBeanFactory(@Nonnull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessBeanDefinitionRegistry
public void postProcessBeanDefinitionRegistry(@Nonnull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanDefinitionRegistryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Throws:
org.springframework.beans.BeansException
-