Package org.axonframework.spring.config
Class BeanHelper
java.lang.Object
org.axonframework.spring.config.BeanHelper
Helper class to simplify the creation of bean definitions for components configured in Axon Configuration.
- Since:
- 4.7.4
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.axonframework.modelling.command.Repository<T>repository(Class<T> aggregateType, org.axonframework.config.Configuration configuration) Retrieves theRepositoryfor givenaggregateTypefrom givenconfiguration.
-
Method Details
-
repository
public static <T> org.axonframework.modelling.command.Repository<T> repository(Class<T> aggregateType, org.axonframework.config.Configuration configuration) Retrieves theRepositoryfor givenaggregateTypefrom givenconfiguration.- Type Parameters:
T- The type of aggregate.- Parameters:
aggregateType- The type to find the repository for.configuration- The configuration from which to retrieve theRepository.- Returns:
- The
Repositoryinstance for the aggregate. - Throws:
IllegalArgumentException- if the givenaggregateTypehas not been configured.
-