Example usage for Java org.springframework.context.support ClassPathXmlApplicationContext fields, constructors, methods, implement or subclass
The text is from its open source code.
ClassPathXmlApplicationContext(ApplicationContext parent) Create a new ClassPathXmlApplicationContext for bean-style configuration. | |
ClassPathXmlApplicationContext(String configLocation) Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML file and automatically refreshing the context. | |
ClassPathXmlApplicationContext(String... configLocations) Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files and automatically refreshing the context. | |
ClassPathXmlApplicationContext(String[] configLocations, @Nullable ApplicationContext parent) Create a new ClassPathXmlApplicationContext with the given parent, loading the definitions from the given XML files and automatically refreshing the context. | |
ClassPathXmlApplicationContext(String[] configLocations, boolean refresh) Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files. | |
ClassPathXmlApplicationContext(String path, Class> clazz) Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML file and automatically refreshing the context. | |
ClassPathXmlApplicationContext(String[] paths, Class> clazz) Create a new ClassPathXmlApplicationContext, loading the definitions from the given XML files and automatically refreshing the context. | |
ClassPathXmlApplicationContext() Create a new ClassPathXmlApplicationContext for bean-style configuration. |
void | addApplicationListener(ApplicationListener> listener) |
void | addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor) |
void | close() Close this application context, destroying all beans in its bean factory. |
boolean | containsBean(String name) |
void | destroy() Callback for destruction of this instance, originally attached to a DisposableBean implementation (not anymore in 5.0). |
AutowireCapableBeanFactory | getAutowireCapableBeanFactory() Return this context's internal bean factory as AutowireCapableBeanFactory, if already available. |
T | getBean(String name, Class |
Object | getBean(String name) |
int | getBeanDefinitionCount() |
String[] | getBeanDefinitionNames() |
ConfigurableListableBeanFactory | getBeanFactory() |
String[] | getBeanNamesForType(ResolvableType type) |
String[] | getBeanNamesForType(ResolvableType type, boolean includeNonSingletons, boolean allowEagerInit) |
Map | getBeansOfType(@Nullable Class |
Map | getBeansOfType(@Nullable Class |
ClassLoader | getClassLoader() Return the ClassLoader to load class path resources with. |
String | getDisplayName() Return a friendly name for this context. |
ConfigurableEnvironment | getEnvironment() Return the Environment for this application context in configurable form, allowing for further customization. |
String | getMessage(String code, @Nullable Object[] args, Locale locale) |
long | getStartupDate() Return the timestamp (ms) when this context was first loaded. |
boolean | isActive() |
boolean | isSingleton(String name) |
void | refresh() |
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 | setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding) Set whether it should be allowed to override bean definitions by registering a different definition with the same name, automatically replacing the former. |
void | setClassLoader(@Nullable ClassLoader classLoader) Specify the ClassLoader to load class path resources with, or null for using the thread context class loader at the time of actual resource access. |
void | setConfigLocation(String location) Set the config locations for this application context in init-param style, i.e. |
void | setConfigLocations(@Nullable String... locations) Set the config locations for this application context. |
void | setDisplayName(String displayName) Set a friendly name for this context. |
void | setId(String id) |
void | setParent(@Nullable ApplicationContext parent) Set the parent of this application context. |
void | setValidating(boolean validating) Set whether to use XML validation. |
void | start() |
void | stop() |