Example usage for Java org.springframework.web.context ConfigurableWebApplicationContext fields, constructors, methods, implement or subclass
The text is from its open source code.
String | APPLICATION_CONTEXT_ID_PREFIX Prefix for ApplicationContext ids that refer to context path and/or servlet name. |
void | addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor) Add a new BeanFactoryPostProcessor that will get applied to the internal bean factory of this application context on refresh, before any of the bean definitions get evaluated. |
void | close() Close this application context, releasing all resources and locks that the implementation might hold. |
Object | getBean(String name) Return an instance, which may be shared or independent, of the specified bean. |
ConfigurableListableBeanFactory | getBeanFactory() Return the internal bean factory of this application context. |
Map | getBeansOfType(@Nullable Class Return the bean instances that match the given object type (including subclasses), judging from either bean definitions or the value of getObjectType in the case of FactoryBeans. |
Class> | getClass() Returns the runtime class of this Object . |
ClassLoader | getClassLoader() Expose the ClassLoader used by this ResourceLoader. |
String[] | getConfigLocations() Return the config locations for this web application context, or null if none specified. |
Environment | getEnvironment() Return the Environment associated with this component. |
String | getId() Return the unique id of this application context. |
ApplicationContext | getParent() Return the parent context, or null if there is no parent and this is the root of the context hierarchy. |
Resource | getResource(String location) Return a Resource handle for the specified resource location. |
Resource[] | getResources(String locationPattern) Resolve the given location pattern into Resource objects. |
ServletConfig | getServletConfig() Return the ServletConfig for this web application context, if any. |
ServletContext | getServletContext() Return the standard Servlet API ServletContext for this application. |
boolean | isActive() Determine whether this application context is active, that is, whether it has been refreshed at least once and has not been closed yet. |
boolean | isRunning() Check whether this component is currently running. |
void | refresh() Load or refresh the persistent representation of the configuration, which might an XML file, properties file, or relational database schema. |
void | registerShutdownHook() Register a shutdown hook with the JVM runtime, closing this context on JVM shutdown unless it has already been closed at that time. |
void | setConfigLocation(String configLocation) Set the config locations for this web application context in init-param style, i.e. |
void | setConfigLocations(String... configLocations) Set the config locations for this web application context. |
void | setEnvironment(ConfigurableEnvironment environment) Set the Environment for this application context. |
void | setId(String id) Set the unique id of this application context. |
void | setNamespace(@Nullable String namespace) Set the namespace for this web application context, to be used for building a default context config location. |
void | setParent(@Nullable ApplicationContext parent) Set the parent of this application context. |
void | setServletConfig(@Nullable ServletConfig servletConfig) Set the ServletConfig for this web application context. |
void | setServletContext(@Nullable ServletContext servletContext) Set the ServletContext for this web application context. |
void | start() Start this component. |
void | stop() Stop this component, typically in a synchronous fashion, such that the component is fully stopped upon return of this method. |