类 DubboBeanUtils


  • public abstract class DubboBeanUtils
    extends Object
    Dubbo Bean utilities class
    从以下版本开始:
    2.7.6
    • 构造器详细资料

      • DubboBeanUtils

        public DubboBeanUtils()
    • 方法详细资料

      • getOptionalBean

        public static <T> T getOptionalBean​(org.springframework.beans.factory.ListableBeanFactory beanFactory,
                                            String beanName,
                                            Class<T> beanType)
                                     throws org.springframework.beans.BeansException
        Get optional bean by name and type if beanName is not null, or else find by type
        类型参数:
        T -
        参数:
        beanFactory -
        beanName -
        beanType -
        返回:
        抛出:
        org.springframework.beans.BeansException
      • getBean

        public static <T> T getBean​(org.springframework.beans.factory.ListableBeanFactory beanFactory,
                                    String beanName,
                                    Class<T> beanType)
                             throws org.springframework.beans.BeansException
        抛出:
        org.springframework.beans.BeansException
      • getBeans

        public static <T> List<T> getBeans​(org.springframework.beans.factory.ListableBeanFactory beanFactory,
                                           String[] beanNames,
                                           Class<T> beanType)
                                    throws org.springframework.beans.BeansException
        Get beans by names and type
        类型参数:
        T -
        参数:
        beanFactory -
        beanNames -
        beanType -
        返回:
        抛出:
        org.springframework.beans.BeansException