ContextLoader and
org.springframework.web.servlet.FrameworkServlet .Note
The setters of this interface need to be called before an
invocation of the refresh method inherited from
org..
They do not cause an initialization of the context on their own.
refresh, ContextLoader#createWebApplicationContext, org.springframework.web.servlet.FrameworkServlet#createWebApplicationContext
| Modifier and Type | Field and Description |
|---|---|
| public static final String | APPLICATION_CONTEXT_ID_PREFIX
Prefix for ApplicationContext ids that refer to context path and/or servlet name. |
| public static final String | SERVLET_CONFIG_BEAN_NAME
Name of the ServletConfig environment bean in the factory. |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | getConfigLocations()
Return the config locations for this web application context,
or |
| public String | |
| public ServletConfig | |
| public void | setConfigLocation(String configLocation)
Set the config locations for this web application context in init-param style, i.e. with distinct locations separated by commas, semicolons or whitespace. |
| public void | setConfigLocations(String... configLocations)
Set the config locations for this web application context. |
| public void | setNamespace(String namespace)
Set the namespace for this web application context, to be used for building a default context config location. |
| public void | setServletConfig(ServletConfig servletConfig)
Set the ServletConfig for this web application context. |
| public void | setServletContext(ServletContext servletContext)
Set the ServletContext for this web application context. |
| APPLICATION_CONTEXT_ID_PREFIX | back to summary |
|---|---|
| public static final String APPLICATION_CONTEXT_ID_PREFIX Prefix for ApplicationContext ids that refer to context path and/or servlet name. | |
| SERVLET_CONFIG_BEAN_NAME | back to summary |
|---|---|
| public static final String SERVLET_CONFIG_BEAN_NAME Name of the ServletConfig environment bean in the factory.
| |
| getConfigLocations | back to summary |
|---|---|
| public String[] getConfigLocations() Return the config locations for this web application context,
or
| |
| getNamespace | back to summary |
|---|---|
| public String getNamespace() Return the namespace for this web application context, if any.
| |
| getServletConfig | back to summary |
|---|---|
| public ServletConfig getServletConfig() Return the ServletConfig for this web application context, if any.
| |
| setConfigLocation | back to summary |
|---|---|
| public void setConfigLocation(String configLocation) Set the config locations for this web application context in init-param style, i.e. with distinct locations separated by commas, semicolons or whitespace. If not set, the implementation is supposed to use a default for the given namespace or the root web application context, as appropriate. | |
| setConfigLocations | back to summary |
|---|---|
| public void setConfigLocations(String... configLocations) Set the config locations for this web application context. If not set, the implementation is supposed to use a default for the given namespace or the root web application context, as appropriate. | |
| setNamespace | back to summary |
|---|---|
| public void setNamespace(String namespace) 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) 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) 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.
| |