org.jiucai.appframework.base.spring.helper
类 SpringHelper
java.lang.Object
org.jiucai.appframework.base.spring.helper.SpringHelper
- 所有已实现的接口:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class SpringHelper
- extends Object
- implements org.springframework.context.ApplicationContextAware
从 ServletContext 或 Bean初始化时 获取 spring 上下文
- 作者:
- zhaidw
|
字段摘要 |
protected static org.springframework.context.ApplicationContext |
context
|
protected Logs |
log
|
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected Logs log
context
protected static org.springframework.context.ApplicationContext context
SpringHelper
public SpringHelper()
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext(javax.servlet.http.HttpServletRequest request)
- 从 ServletContext 获取 ApplicationContext
- 参数:
request -
- 返回:
- ApplicationContext
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()
- 返回 Bean初始化时 的 ApplicationContext
- 返回:
- ApplicationContext
getBean
public static Object getBean(String name)
getBean
public static <T> T getBean(String name,
Class<T> requiredType)
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- 指定者:
- 接口
org.springframework.context.ApplicationContextAware 中的 setApplicationContext
- 抛出:
org.springframework.beans.BeansException
Copyright © 2013. All Rights Reserved.