接口的使用
org.springframework.context.ConfigurableApplicationContext
使用ConfigurableApplicationContext的程序包 程序包 说明 org.springframework.context This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.jca.context Integration package that allows for deploying a Spring application context as a JCA 1.7 compliant RAR file.org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.support Support classes for the Spring TestContext Framework.org.springframework.test.context.web Web support classes for the Spring TestContext Framework.org.springframework.web.context Contains a variant of the application context interface for web applications, and the ContextLoaderListener that bootstraps a root web application context.org.springframework.web.context.support Classes supporting theorg.springframework.web.contextpackage, such as WebApplicationContext implementations and various utility classes.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.context中ConfigurableApplicationContext的使用
类型参数类型为ConfigurableApplicationContext的org.springframework.context中的类 修饰符和类型 接口 说明 interfaceApplicationContextInitializer<C extends ConfigurableApplicationContext>Callback interface for initializing a SpringConfigurableApplicationContextprior to being refreshed.org.springframework.context.annotation中ConfigurableApplicationContext的使用
实现ConfigurableApplicationContext的org.springframework.context.annotation中的类 修饰符和类型 类 说明 classAnnotationConfigApplicationContextStandalone application context, accepting component classes as input — in particular@Configuration-annotated classes, but also plain@Componenttypes and JSR-330 compliant classes usingjavax.injectannotations.org.springframework.context.support中ConfigurableApplicationContext的使用
实现ConfigurableApplicationContext的org.springframework.context.support中的类 修饰符和类型 类 说明 classAbstractApplicationContextAbstract implementation of theApplicationContextinterface.classAbstractRefreshableApplicationContextBase class forApplicationContextimplementations which are supposed to support multiple calls toAbstractApplicationContext.refresh(), creating a new internal bean factory instance every time.classAbstractRefreshableConfigApplicationContextAbstractRefreshableApplicationContextsubclass that adds common handling of specified config locations.classAbstractXmlApplicationContextConvenient base class forApplicationContextimplementations, drawing configuration from XML documents containing bean definitions understood by anXmlBeanDefinitionReader.classClassPathXmlApplicationContextStandalone XML application context, taking the context definition files from the class path, interpreting plain paths as class path resource names that include the package path (e.g.classFileSystemXmlApplicationContextStandalone XML application context, taking the context definition files from the file system or from URLs, interpreting plain paths as relative file system locations (e.g.classGenericApplicationContextGeneric ApplicationContext implementation that holds a single internalDefaultListableBeanFactoryinstance and does not assume a specific bean definition format.classGenericGroovyApplicationContextAnApplicationContextimplementation that extendsGenericApplicationContextand implementsGroovyObjectsuch that beans can be retrieved with the dot de-reference syntax instead of usingAbstractApplicationContext.getBean(java.lang.String).classGenericXmlApplicationContextConvenient application context with built-in XML support.classStaticApplicationContextApplicationContextimplementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.返回变量类型为ConfigurableApplicationContext的类型的org.springframework.context.support中的方法 修饰符和类型 方法 说明 protected Set<ConfigurableApplicationContext>LiveBeansView. findApplicationContexts()Find all applicable ApplicationContexts for the current application.类型变量类型为ConfigurableApplicationContext的org.springframework.context.support中的方法参数 修饰符和类型 方法 说明 protected StringLiveBeansView. generateJson(Set<ConfigurableApplicationContext> contexts)Actually generate a JSON snapshot of the beans in the given ApplicationContexts.org.springframework.jca.context中ConfigurableApplicationContext的使用
实现ConfigurableApplicationContext的org.springframework.jca.context中的类 修饰符和类型 类 说明 classResourceAdapterApplicationContextApplicationContextimplementation for a JCA ResourceAdapter.返回ConfigurableApplicationContext的org.springframework.jca.context中的方法 修饰符和类型 方法 说明 protected ConfigurableApplicationContextSpringContextResourceAdapter. createApplicationContext(BootstrapContext bootstrapContext)Build a Spring ApplicationContext for the given JCA BootstrapContext.org.springframework.test.context中ConfigurableApplicationContext的使用
参数类型为ConfigurableApplicationContext的org.springframework.test.context中的方法 修饰符和类型 方法 说明 voidContextCustomizer. customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)Customize the suppliedConfigurableApplicationContextafter bean definitions have been loaded into the context but before the context has been refreshed.org.springframework.test.context.support中ConfigurableApplicationContext的使用
返回ConfigurableApplicationContext的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 ConfigurableApplicationContextAbstractGenericContextLoader. loadContext(String... locations)Load a Spring ApplicationContext from the suppliedlocations.ConfigurableApplicationContextAbstractGenericContextLoader. loadContext(MergedContextConfiguration mergedConfig)Load a Spring ApplicationContext from the suppliedMergedContextConfiguration.参数类型为ConfigurableApplicationContext的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 static voidTestPropertySourceUtils. addInlinedPropertiesToEnvironment(ConfigurableApplicationContext context, String... inlinedProperties)Add the given inlined properties to theEnvironmentof the suppliedcontext.static voidTestPropertySourceUtils. addPropertiesFilesToEnvironment(ConfigurableApplicationContext context, String... locations)Add thePropertiesfiles from the given resourcelocationsto theEnvironmentof the suppliedcontext.protected voidAbstractContextLoader. customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)Customize theConfigurableApplicationContextcreated by thisContextLoaderafter bean definitions have been loaded into the context but before the context has been refreshed.protected voidAbstractContextLoader. prepareContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)Prepare theConfigurableApplicationContextcreated by thisSmartContextLoaderbefore bean definitions are read.org.springframework.test.context.web中ConfigurableApplicationContext的使用
返回ConfigurableApplicationContext的org.springframework.test.context.web中的方法 修饰符和类型 方法 说明 ConfigurableApplicationContextAbstractGenericWebContextLoader. loadContext(MergedContextConfiguration mergedConfig)Load a SpringWebApplicationContextfrom the suppliedMergedContextConfiguration.org.springframework.web.context中ConfigurableApplicationContext的使用
org.springframework.web.context中ConfigurableApplicationContext的子接口 修饰符和类型 接口 说明 interfaceConfigurableWebApplicationContextInterface to be implemented by configurable web application contexts.返回变量类型为ConfigurableApplicationContext的类型的org.springframework.web.context中的方法 修饰符和类型 方法 说明 protected List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>>ContextLoader. determineContextInitializerClasses(ServletContext servletContext)Return theApplicationContextInitializerimplementation classes to use if any have been specified byContextLoader.CONTEXT_INITIALIZER_CLASSES_PARAM.org.springframework.web.context.support中ConfigurableApplicationContext的使用
实现ConfigurableApplicationContext的org.springframework.web.context.support中的类 修饰符和类型 类 说明 classAbstractRefreshableWebApplicationContextAbstractRefreshableApplicationContextsubclass which implements theConfigurableWebApplicationContextinterface for web environments.classAnnotationConfigWebApplicationContextWebApplicationContextimplementation which accepts component classes as input — in particular@Configuration-annotated classes, but also plain@Componentclasses and JSR-330 compliant classes usingjavax.injectannotations.classGenericWebApplicationContextSubclass ofGenericApplicationContext, suitable for web environments.classGroovyWebApplicationContextWebApplicationContextimplementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader.classStaticWebApplicationContextStaticWebApplicationContextimplementation for testing.classXmlWebApplicationContextWebApplicationContextimplementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader.返回变量类型为ConfigurableApplicationContext的类型的org.springframework.web.context.support中的方法 修饰符和类型 方法 说明 protected Set<ConfigurableApplicationContext>ServletContextLiveBeansView. findApplicationContexts()org.springframework.web.servlet中ConfigurableApplicationContext的使用
参数类型为ConfigurableApplicationContext的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected voidFrameworkServlet. applyInitializers(ConfigurableApplicationContext wac)Delegate the WebApplicationContext before it is refreshed to anyApplicationContextInitializerinstances specified by the "contextInitializerClasses" servlet init-param.