Class SpringConfigurer

java.lang.Object
org.axonframework.config.DefaultConfigurer
org.axonframework.spring.config.SpringConfigurer
All Implemented Interfaces:
Configurer, LifecycleOperations

public class SpringConfigurer extends DefaultConfigurer
A Configurer implementation that considers the Spring Application context as a source for components.
Since:
4.6.0
Author:
Allard Buijze
  • Constructor Details

    • SpringConfigurer

      public SpringConfigurer(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Initialize this Configurer using given beanFactory to locate components.
      Parameters:
      beanFactory - The Bean Factory to find components in.
  • Method Details

    • defaultComponent

      protected <T> Optional<T> defaultComponent(Class<T> type, Configuration config)
      Description copied from class: DefaultConfigurer
      Method returning a default component to use for given type for given configuration, or an empty Optional if no default can be provided.
      Overrides:
      defaultComponent in class DefaultConfigurer
      Type Parameters:
      T - The type of component.
      Parameters:
      type - The type of component to find a default for.
      config - The configuration the component is configured in.
      Returns:
      An Optional containing a default component, or empty if none can be provided.