类 BeanFactoryUtils
-
- com.alibaba.dubbo.config.spring.util.BeanFactoryUtils
-
public abstract class BeanFactoryUtils extends
BeanFactory
Utilities class- 另请参阅:
BeanFactory
,ConfigurableBeanFactory
,BeanFactoryUtils
-
-
构造器概要
构造器 构造器 说明 BeanFactoryUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static boolean
addApplicationListener(org.springframework.context.ApplicationContext applicationContext, org.springframework.context.ApplicationListener listener)
static <T> <T>
getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, [] beanNames, <T> beanType)
Gets name-matched Beans fromBeanFactory
static <T> T
getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, beanName, <T> beanType)
Get optional Bean
-
-
-
方法详细资料
-
addApplicationListener
public static boolean addApplicationListener(org.springframework.context.ApplicationContext applicationContext, org.springframework.context.ApplicationListener listener)
-
getOptionalBean
public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, beanName, <T> beanType)
Get optional Bean- 类型参数:
T
- the of Bean- 参数:
beanFactory
-ListableBeanFactory
beanName
- the name of BeanbeanType
- the of Bean- 返回:
- A bean if present , or
null
- 从以下版本开始:
- 2.6.6
-
getBeans
public static <T> <T> getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, [] beanNames, <T> beanType)
Gets name-matched Beans fromBeanFactory
- 类型参数:
T
- the of Bean- 参数:
beanFactory
-BeanFactory
beanNames
- the names of BeanbeanType
- the of Bean- 返回:
- the read-only and non-null of Bean names
- 从以下版本开始:
- 2.6.6
-
-