ClassPathXmlApplicationContext()
Create a new ClassPathXmlApplicationContext for bean-style configuration.
See Also
#setConfigLocation#setConfigLocations#afterPropertiesSet()
ClassPathXmlApplicationContext(parent: ApplicationContext)
Create a new ClassPathXmlApplicationContext for bean-style configuration.
See Also
#setConfigLocation#setConfigLocations#afterPropertiesSet()
ClassPathXmlApplicationContext(configLocation: String)
Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML file and automatically refreshing the context.
configLocation - resource location
BeansException - if context creation failed
ClassPathXmlApplicationContext(vararg configLocations: String)
Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files and automatically refreshing the context.
configLocations - array of resource locations
BeansException - if context creation failed
ClassPathXmlApplicationContext(configLocations: Array<String>, @Nullable parent: ApplicationContext)
Create a new ClassPathXmlApplicationContext with the given parent, loading the definitions from the given XML files and automatically refreshing the context.
configLocations - array of resource locations
BeansException - if context creation failed
ClassPathXmlApplicationContext(configLocations: Array<String>, refresh: Boolean)
Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files.
configLocations - array of resource locations
refresh - whether to automatically refresh the context, loading all bean definitions and creating all singletons. Alternatively, call refresh manually after further configuring the context.
BeansException - if context creation failed
See Also
#refresh()
ClassPathXmlApplicationContext(configLocations: Array<String>, refresh: Boolean, @Nullable parent: ApplicationContext)
Create a new ClassPathXmlApplicationContext with the given parent, loading the definitions from the given XML files.
configLocations - array of resource locations
refresh - whether to automatically refresh the context, loading all bean definitions and creating all singletons. Alternatively, call refresh manually after further configuring the context.
BeansException - if context creation failed
See Also
#refresh()
ClassPathXmlApplicationContext(path: String, clazz: Class<*>)
Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML file and automatically refreshing the context.
This is a convenience method to load class path resources relative to a given Class. For full flexibility, consider using a GenericApplicationContext with an XmlBeanDefinitionReader and a ClassPathResource argument.
path - relative (or absolute) path within the class path
clazz - the class to load resources with (basis for the given paths)
BeansException - if context creation failed
See Also
org.springframework.core.io.ClassPathResource#ClassPathResource(String, Class)org.springframework.context.support.GenericApplicationContextorg.springframework.beans.factory.xml.XmlBeanDefinitionReader
ClassPathXmlApplicationContext(paths: Array<String>, clazz: Class<*>)
Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files and automatically refreshing the context.
paths - array of relative (or absolute) paths within the class path
clazz - the class to load resources with (basis for the given paths)
BeansException - if context creation failed
See Also
org.springframework.core.io.ClassPathResource#ClassPathResource(String, Class)org.springframework.context.support.GenericApplicationContextorg.springframework.beans.factory.xml.XmlBeanDefinitionReader
ClassPathXmlApplicationContext(paths: Array<String>, clazz: Class<*>, @Nullable parent: ApplicationContext)
Create a new ClassPathXmlApplicationContext with the given parent, loading the definitions from the given XML files and automatically refreshing the context.
paths - array of relative (or absolute) paths within the class path
clazz - the class to load resources with (basis for the given paths)
BeansException - if context creation failed
See Also
org.springframework.core.io.ClassPathResource#ClassPathResource(String, Class)org.springframework.context.support.GenericApplicationContextorg.springframework.beans.factory.xml.XmlBeanDefinitionReader