public abstract class DubboBeanUtils extends Object
| Constructor and Description |
|---|
DubboBeanUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getBean(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 type
|
static <T> T |
getOptionalBean(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 type
|
static void |
registerCommonBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
Register the common beans
|
public static void registerCommonBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
registry - BeanDefinitionRegistryReferenceAnnotationBeanPostProcessor,
DubboConfigDefaultPropertyValueBeanPostProcessor,
DubboConfigAliasPostProcessor,
DubboLifecycleComponentApplicationListener,
DubboBootstrapApplicationListenerpublic static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanName,
Class<T> beanType)
throws org.springframework.beans.BeansException
T - beanFactory - beanName - beanType - org.springframework.beans.BeansExceptionpublic static <T> T getBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanName,
Class<T> beanType)
throws org.springframework.beans.BeansException
org.springframework.beans.BeansExceptionpublic static <T> List<T> getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, String[] beanNames, Class<T> beanType) throws org.springframework.beans.BeansException
T - beanFactory - beanNames - beanType - org.springframework.beans.BeansExceptionCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.