类 BeanFactoryUtils

java.lang.Object
com.alibaba.ageiport.common.utils.BeanFactoryUtils

public abstract class BeanFactoryUtils extends Object
BeanFactory Utilities class
作者:
lingyi
  • 构造器详细资料

    • BeanFactoryUtils

      public BeanFactoryUtils()
  • 方法详细资料

    • getOptionalBean

      public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, String beanName, Class<T> beanType)
      Get optional Bean
      类型参数:
      T - the type of Bean
      参数:
      beanFactory - ListableBeanFactory
      beanName - the name of Bean
      beanType - the type of Bean
      返回:
      A bean if present , or null
    • getBeans

      public static <T> List<T> getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, String[] beanNames, Class<T> beanType)
      Gets name-matched Beans from BeanFactory
      类型参数:
      T - the type of Bean
      参数:
      beanFactory - BeanFactory
      beanNames - the names of Bean
      beanType - the type of Bean
      返回:
      the read-only and non-null List of Bean names