Class BeanRegistrar


  • public class BeanRegistrar
    extends Object
    Utility to add beans to Spring's bean definition registry.
    Since:
    3.0.0
    Author:
    Rutger Lubbers, Paul Klos
    • Constructor Detail

      • BeanRegistrar

        public BeanRegistrar​(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
        The constructor.
        Parameters:
        registry - Spring's bean definition registry.
    • Method Detail

      • registerBean

        public void registerBean​(String beanName,
                                 Class<?> clazz)
        Create a GenericBeanDefinition of the specified class and register it with the registry.
        Parameters:
        beanName - the bean name
        clazz - the bean class
      • registerBean

        public void registerBean​(String beanName,
                                 Class<?> clazz,
                                 @Nullable
                                 org.springframework.beans.factory.config.ConstructorArgumentValues constructorArgumentValues)
        Create a GenericBeanDefinition of the specified class and register it with the registry.
        Parameters:
        beanName - the bean name
        clazz - the bean class
        constructorArgumentValues - the constructor arguments.