public class ApplicationContextProvider
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ResourceLoaderAware
Constructor and Description |
---|
ApplicationContextProvider() |
Modifier and Type | Method and Description |
---|---|
static org.springframework.context.ApplicationContext |
getApplicationContext() |
org.springframework.beans.factory.config.AutowireCapableBeanFactory |
getAutowireCapableBeanFactory() |
org.springframework.context.ConfigurableApplicationContext |
getConfigurableApplicationContext() |
static org.springframework.core.io.ResourceLoader |
getResourceLoader()
Gets resource loader.
|
static <T> T |
registerBeanIntoApplicationContext(org.springframework.context.ConfigurableApplicationContext applicationContext,
java.lang.Class<T> beanClazz,
java.lang.String beanId)
Register bean into application context.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext ctx) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
public static org.springframework.context.ApplicationContext getApplicationContext()
public static <T> T registerBeanIntoApplicationContext(org.springframework.context.ConfigurableApplicationContext applicationContext, java.lang.Class<T> beanClazz, java.lang.String beanId)
T
- the type parameterapplicationContext
- the application contextbeanClazz
- the bean clazzbeanId
- the bean idpublic void setApplicationContext(org.springframework.context.ApplicationContext ctx)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public org.springframework.context.ConfigurableApplicationContext getConfigurableApplicationContext()
public static org.springframework.core.io.ResourceLoader getResourceLoader()
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
public org.springframework.beans.factory.config.AutowireCapableBeanFactory getAutowireCapableBeanFactory()