|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.io.DefaultResourceLoader org.springframework.context.support.AbstractApplicationContext org.springframework.context.support.StaticApplicationContext
ApplicationContext that allows concrete registration of beans and messages in code, rather than from external configuration sources. Mainly useful for testing.
Field Summary |
Fields inherited from class org.springframework.context.support.AbstractApplicationContext |
logger, MESSAGE_SOURCE_BEAN_NAME |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
CLASSPATH_URL_PREFIX |
Constructor Summary | |
StaticApplicationContext()
Create new StaticApplicationContext. |
|
StaticApplicationContext(ApplicationContext parent)
Create new StaticApplicationContext with the given parent. |
Method Summary | |
void |
addMessage(java.lang.String code,
java.util.Locale locale,
java.lang.String defaultMessage)
Associate the given message with the given code. |
ConfigurableListableBeanFactory |
getBeanFactory()
Return underlying bean factory for super class. |
DefaultListableBeanFactory |
getDefaultListableBeanFactory()
Return the underlying bean factory of this context. |
protected void |
refreshBeanFactory()
Do nothing: We rely on callers to update our public methods. |
void |
registerPrototype(java.lang.String name,
java.lang.Class clazz,
MutablePropertyValues pvs)
Register a prototype bean with the default bean factory. |
void |
registerSingleton(java.lang.String name,
java.lang.Class clazz,
MutablePropertyValues pvs)
Register a singleton bean with the default bean factory. |
Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, getAliases, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeansOfType, getDisplayName, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getStartupDate, isSingleton, onRefresh, postProcessBeanFactory, publishEvent, refresh, setDisplayName, setParent, toString |
Methods inherited from class org.springframework.core.io.DefaultResourceLoader |
getResource, getResourceByPath |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.core.io.ResourceLoader |
getResource |
Constructor Detail |
public StaticApplicationContext() throws BeansException
public StaticApplicationContext(ApplicationContext parent) throws BeansException
parent
- the parent application contextMethod Detail |
public DefaultListableBeanFactory getDefaultListableBeanFactory()
public ConfigurableListableBeanFactory getBeanFactory()
getBeanFactory
in interface ConfigurableApplicationContext
getBeanFactory
in class AbstractApplicationContext
protected void refreshBeanFactory()
refreshBeanFactory
in class AbstractApplicationContext
AbstractApplicationContext.refresh()
public void registerSingleton(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs) throws BeansException
BeansException
public void registerPrototype(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs) throws BeansException
BeansException
public void addMessage(java.lang.String code, java.util.Locale locale, java.lang.String defaultMessage)
code
- lookup codelocale
- locale message should be found withindefaultMessage
- message associated with this lookup code
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |