Class BeanFactory


  • public class BeanFactory
    extends Object
    Author:
    qinman, zhangchongjie
    Date:
    2022/12/20
    • Constructor Summary

      Constructors 
      Constructor Description
      BeanFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.springframework.beans.factory.support.DefaultListableBeanFactory addBean​(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory, String beanName)
      向BeanFactory中添加实体类对象
      static void delBean​(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory, String beanName)
      从BeanFactory中删除实体类对象
      static org.springframework.beans.factory.support.DefaultListableBeanFactory getBeanFactory​(org.springframework.context.ConfigurableApplicationContext applicationContext)
      从spring应用上下文中获取BeanFactory
    • Constructor Detail

      • BeanFactory

        public BeanFactory()
    • Method Detail

      • addBean

        public static org.springframework.beans.factory.support.DefaultListableBeanFactory addBean​(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory,
                                                                                                   String beanName)
        向BeanFactory中添加实体类对象
        Parameters:
        beanFactory - spring的BeanFactory
        beanName - 实体类的名称,例如net.risesoft.fileflow.service.Test1
        Returns:
      • delBean

        public static void delBean​(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory,
                                   String beanName)
        从BeanFactory中删除实体类对象
        Parameters:
        beanFactory - spring的BeanFactory
        beanName - 实体类的名称,例如net.risesoft.fileflow.service.Test1
      • getBeanFactory

        public static org.springframework.beans.factory.support.DefaultListableBeanFactory getBeanFactory​(org.springframework.context.ConfigurableApplicationContext applicationContext)
        从spring应用上下文中获取BeanFactory
        Parameters:
        applicationContext - spring应用上下文
        Returns: