open class StaticWebApplicationContext : StaticApplicationContext, ConfigurableWebApplicationContext, ThemeSource
Static org.springframework.web.context.WebApplicationContext implementation for testing. Not intended for use in production applications.
Implements the org.springframework.web.context.ConfigurableWebApplicationContext interface to allow for direct replacement of an XmlWebApplicationContext, despite not actually supporting external configuration files.
Interprets resource paths as servlet context resources, i.e. as paths beneath the web application root. Absolute paths, e.g. for files outside the web app root, can be accessed via "file:" URLs, as implemented by org.springframework.core.io.DefaultResourceLoader.
In addition to the special beans detected by org.springframework.context.support.AbstractApplicationContext, this class detects a bean of type org.springframework.ui.context.ThemeSource in the context, under the special bean name "themeSource".
Author
Rod Johnson
Author
Juergen Hoeller
See Also
org.springframework.ui.context.ThemeSource
StaticWebApplicationContext() |
open fun getConfigLocations(): Array<String> |
|
open fun getNamespace(): String |
|
open fun getServletConfig(): ServletConfig |
|
open fun getServletContext(): ServletContext |
|
open fun getTheme(themeName: String): Theme |
|
open fun setConfigLocation(configLocation: String): Unit
The StaticWebApplicationContext class does not support this method. |
|
open fun setConfigLocations(vararg configLocations: String): Unit
The StaticWebApplicationContext class does not support this method. |
|
open fun setNamespace(namespace: String): Unit |
|
open fun setServletConfig(servletConfig: ServletConfig): Unit |
|
open fun setServletContext(servletContext: ServletContext): Unit
Set the ServletContext that this WebApplicationContext runs in. |
open fun addMessage(code: String, locale: Locale, defaultMessage: String): Unit
Associate the given message with the given code. |
|
fun getStaticMessageSource(): StaticMessageSource
Return the internal StaticMessageSource used by this context. Can be used to register messages on it. |
|
open fun registerPrototype(name: String, clazz: Class<*>): Unitopen fun registerPrototype(name: String, clazz: Class<*>, pvs: MutablePropertyValues): Unit
Register a prototype bean with the underlying bean factory. For more advanced needs, register with the underlying BeanFactory directly. |
|
open fun registerSingleton(name: String, clazz: Class<*>): Unitopen fun registerSingleton(name: String, clazz: Class<*>, pvs: MutablePropertyValues): Unit
Register a singleton bean with the underlying bean factory. For more advanced needs, register with the underlying BeanFactory directly. |