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
           
 
构造方法摘要
SpringHelper()
           
 
方法摘要
static org.springframework.context.ApplicationContext getApplicationContext()
          返回 Bean初始化时 的 ApplicationContext
static org.springframework.context.ApplicationContext getApplicationContext(javax.servlet.http.HttpServletRequest request)
          从 ServletContext 获取 ApplicationContext
static Object getBean(String name)
           
static
<T> T
getBean(String name, Class<T> requiredType)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
从类 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.