类 DubboBeanUtils
- java.lang.Object
-
- org.apache.dubbo.config.spring.util.DubboBeanUtils
-
public abstract class DubboBeanUtils extends Object
Dubbo Bean utilities class- 从以下版本开始:
- 2.7.6
-
-
构造器概要
构造器 构造器 说明 DubboBeanUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> TgetBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, String beanName, Class<T> beanType)static <T> List<T>getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, String[] beanNames, Class<T> beanType)Get beans by names and typestatic <T> TgetOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, String beanName, Class<T> beanType)Get optional bean by name and type if beanName is not null, or else find by typestatic voidregisterCommonBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)Register the common beans
-
-
-
方法详细资料
-
registerCommonBeans
public static void registerCommonBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
Register the common beans- 参数:
registry-BeanDefinitionRegistry- 另请参阅:
ReferenceAnnotationBeanPostProcessor,DubboConfigDefaultPropertyValueBeanPostProcessor,DubboConfigAliasPostProcessor,DubboLifecycleComponentApplicationListener,DubboBootstrapApplicationListener
-
getOptionalBean
public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, String beanName, Class<T> beanType) throws org.springframework.beans.BeansExceptionGet 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
-
-