java.lang.Object | ||
↳ | org.springframework.test.context.support.AbstractContextLoader | |
↳ | org.springframework.test.context.support.AbstractGenericContextLoader |
Known Direct Subclasses |
Abstract, generic extension of AbstractContextLoader
which loads a
GenericApplicationContext
from the locations provided to
loadContext(String)
.
Concrete subclasses must provide an appropriate
BeanDefinitionReader
.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Loads a Spring ApplicationContext from the supplied
locations . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Factory method for creating new
BeanDefinitionReader s for
loading bean definitions into the supplied
context . | |||||||||||
Customize the internal bean factory of the ApplicationContext created by
this ContextLoader.
| |||||||||||
Customize the
GenericApplicationContext created by this ContextLoader
after bean definitions have been loaded into the context but
before the context is refreshed. | |||||||||||
Prepare the
GenericApplicationContext created by this ContextLoader. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.test.context.support.AbstractContextLoader
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.test.context.ContextLoader
|
Loads a Spring ApplicationContext from the supplied locations
.
Implementation details:
GenericApplicationContext
instance.BeanDefinitionReader
.customizeBeanFactory(DefaultListableBeanFactory)
to
allow for customizing the context's DefaultListableBeanFactory.AnnotationConfigUtils
for
registering
annotation configuration processors.customizeContext(GenericApplicationContext)
to allow
for customizing the context before it is refreshed.Refreshes
the
context and registers a JVM shutdown hook for it.Subclasses must provide an appropriate implementation of
createBeanDefinitionReader(GenericApplicationContext)
.
Exception |
---|
Factory method for creating new BeanDefinitionReader
s for
loading bean definitions into the supplied
context
.
context | the context for which the BeanDefinitionReader should be created |
---|
Customize the internal bean factory of the ApplicationContext created by this ContextLoader.
The default implementation is empty but can be overridden in subclasses to customize DefaultListableBeanFactory's standard settings.
beanFactory | the bean factory created by this ContextLoader |
---|
Customize the GenericApplicationContext
created by this ContextLoader
after bean definitions have been loaded into the context but
before the context is refreshed.
The default implementation is empty but can be overridden in subclasses to customize the application context.
context | the newly created application context |
---|
Prepare the GenericApplicationContext
created by this ContextLoader.
Called before> bean definitions are read.
The default implementation is empty. Can be overridden in subclasses to customize GenericApplicationContext's standard settings.
context | the context for which the BeanDefinitionReader should be created |
---|