类 SpringContextHolder
java.lang.Object
com.mbap.util.utils.SpringContextHolder
- 所有已实现的接口:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component
public class SpringContextHolder
extends Object
implements org.springframework.context.ApplicationContextAware
bean获取工具类
- 作者:
- Amanda.Z
-
构造器概要
构造器 -
方法概要
-
构造器详细资料
-
SpringContextHolder
public SpringContextHolder()
-
-
方法详细资料
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware- 抛出:
org.springframework.beans.BeansException
-
getBean
根据容器名称获取对应的容器对象- 类型参数:
T-- 参数:
beanName- 容器名称- 返回:
-
getBean
根据容器类获取对应的容器对象- 类型参数:
T-- 参数:
baseType- 容器类- 返回:
-
getBeans
根据容器类获取对应的容器对象- 类型参数:
T-- 参数:
baseType- 容器类- 返回:
-