Package com.alibaba.cola.domain
Class ApplicationContextHelper
- java.lang.Object
-
- com.alibaba.cola.domain.ApplicationContextHelper
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component public class ApplicationContextHelper extends Object implements org.springframework.context.ApplicationContextAware
ApplicationContextHelper- Author:
- Frank Zhang
-
-
Constructor Summary
Constructors Constructor Description ApplicationContextHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.springframework.context.ApplicationContextgetApplicationContext()static <T> TgetBean(Class<T> targetClz)static <T> TgetBean(Class<T> requiredType, Object... params)static ObjectgetBean(String claz)static <T> TgetBean(String name, Class<T> requiredType)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getBean
public static <T> T getBean(Class<T> targetClz)
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()
-
-