public class SpringContextHolder extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.DisposableBean
| 构造器和说明 |
|---|
SpringContextHolder() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy() |
static <T> T |
getBean(Class<T> requiredType)
从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
|
static <T> T |
getBean(String name)
从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public static <T> T getBean(String name)
public static <T> T getBean(Class<T> requiredType)
public void destroy()
destroy 在接口中 org.springframework.beans.factory.DisposableBeanpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2022. All rights reserved.