public class SpringBeanParameterResolverFactory extends Object implements org.axonframework.messaging.annotation.ParameterResolverFactory, org.springframework.context.ApplicationContextAware
Qualifier
annotation on the parameter. By absence of a Qualifier
annotation the bean marked as primary will be chosen. Note that when multiple beans are marked as primary, either one
can be selected as parameter value.| Constructor and Description |
|---|
SpringBeanParameterResolverFactory()
Default constructor, which relies on Spring to inject the application context.
|
SpringBeanParameterResolverFactory(org.springframework.context.ApplicationContext applicationContext)
Convenience constructor to use when an instance is not managed by Spring, but an application context is
available.
|
| Modifier and Type | Method and Description |
|---|---|
org.axonframework.messaging.annotation.ParameterResolver<?> |
createInstance(Executable executable,
Parameter[] parameters,
int parameterIndex) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public SpringBeanParameterResolverFactory()
public SpringBeanParameterResolverFactory(org.springframework.context.ApplicationContext applicationContext)
applicationContext - The application context providing access to beans that may be used as parameterspublic org.axonframework.messaging.annotation.ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
createInstance in interface org.axonframework.messaging.annotation.ParameterResolverFactorypublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2010–2020. All rights reserved.