XmlServletWebServerApplicationContext

ServletWebServerApplicationContext which takes its configuration from XML documents, understood by an org.springframework.beans.factory.xml.XmlBeanDefinitionReader.

Note: In case of multiple config locations, later bean definitions will override ones defined in earlier loaded files. This can be leveraged to deliberately override certain bean definitions through an extra XML file.

Author

Phillip Webb

Since

1.0.0

See also

Constructors

Link copied to clipboard
constructor()
Create a new XmlServletWebServerApplicationContext that needs to be loaded and then manually refreshed.
constructor(resources: Array<Resource>)
Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resources and automatically refreshing the context.
constructor(resourceLocations: Array<String>)
Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resource locations and automatically refreshing the context.
constructor(relativeClass: Class<out Any>, resourceNames: Array<String>)
Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resource locations and automatically refreshing the context.

Properties

Link copied to clipboard
val APPLICATION_EVENT_MULTICASTER_BEAN_NAME: String = "applicationEventMulticaster"
Link copied to clipboard
val APPLICATION_STARTUP_BEAN_NAME: String = "applicationStartup"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val CLASSPATH_ALL_URL_PREFIX: String = "classpath*:"
Link copied to clipboard
val CLASSPATH_URL_PREFIX: String = "classpath:"
Link copied to clipboard
Link copied to clipboard
val CONTEXT_ATTRIBUTES_BEAN_NAME: String = "contextAttributes"
Link copied to clipboard
val CONTEXT_PARAMETERS_BEAN_NAME: String = "contextParameters"
Link copied to clipboard
val CONVERSION_SERVICE_BEAN_NAME: String = "conversionService"
Link copied to clipboard
val DISPATCHER_SERVLET_NAME: String = "dispatcherServlet"
Constant value for the DispatcherServlet bean name.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ENVIRONMENT_BEAN_NAME: String = "environment"
Link copied to clipboard
Link copied to clipboard
open var id: String
Link copied to clipboard
val LIFECYCLE_PROCESSOR_BEAN_NAME: String = "lifecycleProcessor"
Link copied to clipboard
val LOAD_TIME_WEAVER_BEAN_NAME: String = "loadTimeWeaver"
Link copied to clipboard
val MESSAGE_SOURCE_BEAN_NAME: String = "messageSource"
Link copied to clipboard
Link copied to clipboard
val SCOPE_APPLICATION: String = "application"
Link copied to clipboard
val SCOPE_REQUEST: String = "request"
Link copied to clipboard
val SCOPE_SESSION: String = "session"
Link copied to clipboard
Link copied to clipboard
val SERVLET_CONFIG_BEAN_NAME: String = "servletConfig"
Link copied to clipboard
val SERVLET_CONTEXT_BEAN_NAME: String = "servletContext"
Link copied to clipboard
open var servletConfig: ServletConfig
Link copied to clipboard
open var servletContext: ServletContext
Link copied to clipboard
val SHUTDOWN_HOOK_THREAD_NAME: String = "SpringContextShutdownHook"
Link copied to clipboard
open val startupDate: Long
Link copied to clipboard
val SYSTEM_ENVIRONMENT_BEAN_NAME: String = "systemEnvironment"
Link copied to clipboard
val SYSTEM_PROPERTIES_BEAN_NAME: String = "systemProperties"
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun containsBean(name: String): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <A : Annotation?> findAllAnnotationsOnBean(beanName: String, annotationType: Class<A>, allowFactoryBeanInit: Boolean): Set<A>
Link copied to clipboard
open fun <A : Annotation?> findAnnotationOnBean(beanName: String, annotationType: Class<A>): A
Link copied to clipboard
open fun getAliases(name: String): Array<String>
Link copied to clipboard
Link copied to clipboard
open fun getBean(name: String): Any
open fun <T> getBean(name: String, requiredType: Class<T>): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getBeanNamesForAnnotation(annotationType: Class<out Annotation>): Array<String>
Link copied to clipboard
Link copied to clipboard
open fun <T> getBeanProvider(requiredType: Class<T>): ObjectProvider<T>
Link copied to clipboard
open fun <T> getBeansOfType(type: Class<T>): Map<String, T>
Link copied to clipboard
open fun getBeansWithAnnotation(annotationType: Class<out Annotation>): Map<String, Any>
Link copied to clipboard
Link copied to clipboard
abstract fun getEnvironment(): Environment
Link copied to clipboard
open fun getMessage(code: String, args: Array<Any>, defaultMessage: String, locale: Locale): String
Link copied to clipboard
open fun getNamespace(): String
Link copied to clipboard
Link copied to clipboard
open fun getResource(location: String): Resource
Link copied to clipboard
open fun <T> getResourceCache(valueType: Class<T>): Map<Resource, T>
Link copied to clipboard
open fun getResources(locationPattern: String): Array<Resource>
Link copied to clipboard
Returns the server namespace if the specified context is a WebServerApplicationContext.
Link copied to clipboard
open fun getTheme(themeName: String): Theme
Link copied to clipboard
open fun getType(name: String): Class<out Any>
Link copied to clipboard
open fun hasServerNamespace(context: ApplicationContext, serverNamespace: String): Boolean
Returns true if the specified context is a WebServerApplicationContext with a matching server namespace.
Link copied to clipboard
open fun isActive(): Boolean
Link copied to clipboard
open fun isAlias(beanName: String): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isBeanNameInUse(beanName: String): Boolean
Link copied to clipboard
open fun isPrototype(name: String): Boolean
Link copied to clipboard
open fun isRunning(): Boolean
Link copied to clipboard
open fun isSingleton(name: String): Boolean
Link copied to clipboard
open fun isTypeMatch(name: String, typeToMatch: ResolvableType): Boolean
Link copied to clipboard
fun load(resourceLocations: Array<String>)
fun load(resources: Array<Resource>)
fun load(relativeClass: Class<out Any>, resourceNames: Array<String>)
Load bean definitions from the given XML resources.
Link copied to clipboard
Link copied to clipboard
fun refresh()
open fun refresh()
Link copied to clipboard
open fun refreshForAotProcessing(runtimeHints: RuntimeHints)
Link copied to clipboard
open fun registerAlias(beanName: String, alias: String)
Link copied to clipboard
open fun <T> registerBean(beanClass: Class<T>, constructorArgs: Array<Any>)
Link copied to clipboard
open fun registerBeanDefinition(beanName: String, beanDefinition: BeanDefinition)
Link copied to clipboard
Link copied to clipboard
open fun removeAlias(alias: String)
Link copied to clipboard
Link copied to clipboard
open fun removeBeanDefinition(beanName: String)
Link copied to clipboard
open fun setAllowBeanDefinitionOverriding(allowBeanDefinitionOverriding: Boolean)
Link copied to clipboard
open fun setAllowCircularReferences(allowCircularReferences: Boolean)
Link copied to clipboard
open fun setConfigLocation(configLocation: String)
Link copied to clipboard
open fun setConfigLocations(configLocations: Array<String>)
Link copied to clipboard
Delegates the given environment to underlying XmlBeanDefinitionReader.
Link copied to clipboard
open fun setNamespace(namespace: String)
Link copied to clipboard
open fun setResourceLoader(resourceLoader: ResourceLoader)
Link copied to clipboard
open fun setValidating(validating: Boolean)
Set whether to use XML validation.
Link copied to clipboard
open fun start()
Link copied to clipboard
open fun stop()
Link copied to clipboard
open fun toString(): String