public abstract class BeanFactoryUtils
extends java.lang.Object
BeanFactory Utilities class| 构造器 | 说明 |
|---|---|
BeanFactoryUtils() |
| 修饰符和类型 | 方法 | 说明 |
|---|---|---|
static <T> java.util.List<T> |
getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.String[] beanNames,
java.lang.Class<T> beanType) |
Gets name-matched Beans from
BeanFactory |
static <T> T |
getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.String beanName,
java.lang.Class<T> beanType) |
Get optional Bean
|
public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.String beanName,
java.lang.Class<T> beanType)
T - the type of BeanbeanFactory - ListableBeanFactorybeanName - the name of BeanbeanType - the type of Beannullpublic static <T> java.util.List<T> getBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.String[] beanNames,
java.lang.Class<T> beanType)
BeanFactoryT - the type of BeanbeanFactory - BeanFactorybeanNames - the names of BeanbeanType - the type of BeanList of Bean namesCopyright © 2018. All rights reserved.