References Deprecated
ThemeSource is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
org.springframework.context.support.AbstractRefreshableApplicationContext
subclass which implements the
org.springframework.web.context.ConfigurableWebApplicationContext
interface for web environments. Provides a "configLocations" property,
to be populated through the ConfigurableWebApplicationContext interface
on web application startup.
This class is as easy to subclass as AbstractRefreshableApplicationContext:
All you need to implement is the loadBeanDefinitions method;
see the superclass javadoc for details. Note that implementations are supposed
to load bean definitions from the files specified by the locations returned
by the getConfigLocations method.
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..
In addition to the special beans detected by
org.,
this class detects a bean of type org.
in the context, under the special bean name "themeSource".
Theme support is deprecated as of 6.0 with no direct replacement.
This is the web context to be subclassed for a different bean definition format.
Such a context implementation can be specified as "contextClass" context-param
for org. or as "contextClass"
init-param for org.,
replacing the default XmlWebApplicationContext. It will then automatically
receive the "contextConfigLocation" context-param or init-param, respectively.
Note that WebApplicationContext implementations are generally supposed
to configure themselves based on the configuration received through the
ConfigurableWebApplicationContext interface. In contrast, a standalone
application context might allow for configuration in custom startup code
(for example, org.).
loadBeanDefinitions, org.springframework.web.context.ConfigurableWebApplicationContext#setConfigLocations , XmlWebApplicationContext
| Modifier and Type | Field and Description |
|---|---|
| private String | namespace
Namespace of this context, or |
| private ServletConfig | servletConfig
Servlet config that this context runs in, if any. |
| private ServletContext | servletContext
Servlet context that this context runs in. |
| private ThemeSource | themeSource
References Deprecated
the ThemeSource for this ApplicationContext.
ThemeSource is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Access | Constructor and Description |
|---|---|
| public |
| namespace | back to summary |
|---|---|
| private String namespace Namespace of this context, or | |
| servletConfig | back to summary |
|---|---|
| private ServletConfig servletConfig Servlet config that this context runs in, if any. | |
| servletContext | back to summary |
|---|---|
| private ServletContext servletContext Servlet context that this context runs in. | |
| themeSource | back to summary |
|---|---|
| private ThemeSource themeSource
References Deprecated
See corresponding docs for further information. the ThemeSource for this ApplicationContext. | |
| AbstractRefreshableWebApplicationContext | back to summary |
|---|---|
| public AbstractRefreshableWebApplicationContext() | |
| createEnvironment | back to summary |
|---|---|
| protected ConfigurableEnvironment createEnvironment() Overrides org. Create and return a new
| |
| getApplicationName | back to summary |
|---|---|
| public String getApplicationName() Overrides org. Implements org. Doc from org. Return a name for the deployed application that this context belongs to. | |
| getConfigLocations | back to summary |
|---|---|
| public String[] getConfigLocations() Overrides org. Implements org. Doc from org. Return the config locations for this web application context,
or
| |
| getNamespace | back to summary |
|---|---|
| public String getNamespace() Implements org. Doc from org. Return the namespace for this web application context, if any. | |
| getResourceByPath | back to summary |
|---|---|
| protected Resource getResourceByPath(String path) Overrides org. This implementation supports file paths beneath the root of the ServletContext.
| |
| getResourcePatternResolver | back to summary |
|---|---|
| protected ResourcePatternResolver getResourcePatternResolver() Overrides org. This implementation supports pattern matching in unexpanded WARs too.
| |
| getServletConfig | back to summary |
|---|---|
| public ServletConfig getServletConfig() Implements org. Doc from org. Return the ServletConfig for this web application context, if any. | |
| getServletContext | back to summary |
|---|---|
| public ServletContext getServletContext() Implements org. Doc from org. Return the standard Servlet API ServletContext for this application. | |
| getTheme | back to summary |
|---|---|
| public Theme getTheme(String themeName) Implements org. Doc from org. Deprecated
Return the Theme instance for the given theme name. The returned Theme will resolve theme-specific messages, codes, file paths, etc (e.g. CSS and image files in a web environment).
| |
| initPropertySources | back to summary |
|---|---|
| protected void initPropertySources() Overrides org. Doc from org. Replace any stub property sources with actual instances. Replace
| |
| onRefresh | back to summary |
|---|---|
| protected void onRefresh() Overrides org. Initialize the theme capability.
| |
| postProcessBeanFactory | back to summary |
|---|---|
| protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) Overrides org. Register request/session scopes, a
| |
| setNamespace | back to summary |
|---|---|
| public void setNamespace(String namespace) Implements org. Doc from org. Set the namespace for this web application context, to be used for building a default context config location. The root web application context does not have a namespace.
| |
| setServletConfig | back to summary |
|---|---|
| public void setServletConfig(ServletConfig servletConfig) Implements org. Doc from org. Set the ServletConfig for this web application context. Only called for a WebApplicationContext that belongs to a specific Servlet.
| |
| setServletContext | back to summary |
|---|---|
| public void setServletContext(ServletContext servletContext) Implements org. Doc from org. Set the ServletContext for this web application context. Does not cause an initialization of the context: refresh needs to be called after the setting of all configuration properties.
| |