open class GenericXmlApplicationContext : GenericApplicationContext
Convenient application context with built-in XML support. This is a flexible alternative to ClassPathXmlApplicationContext and FileSystemXmlApplicationContext, to be configured via setters, with an eventual #refresh() call activating the context.
In case of multiple configuration files, bean definitions in later files will override those defined in earlier files. This can be leveraged to intentionally override certain bean definitions via an extra configuration file appended to the list.
Author
Juergen Hoeller
Author
Chris Beams
Since
3.0
See Also
#loadXmlBeanDefinitionReaderorg.springframework.context.annotation.AnnotationConfigApplicationContext
GenericXmlApplicationContext()
Create a new GenericXmlApplicationContext that needs to be GenericXmlApplicationContext(vararg resources: Resource)
Create a new GenericXmlApplicationContext, loading bean definitions from the given resources and automatically refreshing the context. GenericXmlApplicationContext(vararg resourceLocations: String)GenericXmlApplicationContext(relativeClass: Class<*>, vararg resourceNames: String)
Create a new GenericXmlApplicationContext, loading bean definitions from the given resource locations and automatically refreshing the context. |
fun getReader(): XmlBeanDefinitionReader
Exposes the underlying XmlBeanDefinitionReader for additional configuration facilities and |
|
open fun load(vararg resources: Resource): Unitopen fun load(vararg resourceLocations: String): Unitopen fun load(relativeClass: Class<*>, vararg resourceNames: String): Unit
Load bean definitions from the given XML resources. |
|
open fun setEnvironment(environment: ConfigurableEnvironment): Unit
Delegates the given environment to underlying XmlBeanDefinitionReader. Should be called before any call to |
|
open fun setValidating(validating: Boolean): Unit
Set whether to use XML validation. Default is |