类的使用
org.springframework.context.support.GenericApplicationContext
使用GenericApplicationContext的程序包 程序包 说明 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.support Support classes for the Spring TestContext Framework.org.springframework.web.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.org.springframework.context.annotation中GenericApplicationContext的使用
org.springframework.context.annotation中GenericApplicationContext的子类 修饰符和类型 类 说明 class
AnnotationConfigApplicationContext
Standalone application context, accepting component classes as input — in particular@Configuration
-annotated classes, but also plain@Component
types and JSR-330 compliant classes usingjavax.inject
annotations.org.springframework.context.support中GenericApplicationContext的使用
org.springframework.context.support中GenericApplicationContext的子类 修饰符和类型 类 说明 class
GenericGroovyApplicationContext
AnApplicationContext
implementation that extendsGenericApplicationContext
and implementsGroovyObject
such that beans can be retrieved with the dot de-reference syntax instead of usingAbstractApplicationContext.getBean(java.lang.String)
.class
GenericXmlApplicationContext
Convenient application context with built-in XML support.class
StaticApplicationContext
ApplicationContext
implementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.org.springframework.jca.context中GenericApplicationContext的使用
org.springframework.jca.context中GenericApplicationContext的子类 修饰符和类型 类 说明 class
ResourceAdapterApplicationContext
ApplicationContext
implementation for a JCA ResourceAdapter.org.springframework.test.context.support中GenericApplicationContext的使用
返回GenericApplicationContext的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 protected GenericApplicationContext
AbstractGenericContextLoader. createContext()
Factory method for creating theGenericApplicationContext
used by thisContextLoader
.参数类型为GenericApplicationContext的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 protected abstract BeanDefinitionReader
AbstractGenericContextLoader. createBeanDefinitionReader(GenericApplicationContext context)
Factory method for creating a newBeanDefinitionReader
for loading bean definitions into the suppliedcontext
.protected BeanDefinitionReader
AnnotationConfigContextLoader. createBeanDefinitionReader(GenericApplicationContext context)
AnnotationConfigContextLoader
should be used as aSmartContextLoader
, not as a legacyContextLoader
.protected BeanDefinitionReader
GenericPropertiesContextLoader. createBeanDefinitionReader(GenericApplicationContext context)
Creates a newPropertiesBeanDefinitionReader
.protected BeanDefinitionReader
GenericXmlContextLoader. createBeanDefinitionReader(GenericApplicationContext context)
Create a newXmlBeanDefinitionReader
.protected void
AbstractGenericContextLoader. customizeContext(GenericApplicationContext context)
Customize theGenericApplicationContext
created by thisContextLoader
after bean definitions have been loaded into the context but before the context is refreshed.protected void
AbstractGenericContextLoader. loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig)
Load bean definitions into the suppliedcontext
from the locations or classes in the suppliedMergedContextConfiguration
.protected void
AnnotationConfigContextLoader. loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig)
Register classes in the suppliedcontext
from the classes in the suppliedMergedContextConfiguration
.protected void
GenericGroovyXmlContextLoader. loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig)
Load bean definitions into the suppliedcontext
from the locations in the suppliedMergedContextConfiguration
using aGroovyBeanDefinitionReader
.protected void
AbstractGenericContextLoader. prepareContext(GenericApplicationContext context)
Prepare theGenericApplicationContext
created by thisContextLoader
.org.springframework.web.context.support中GenericApplicationContext的使用
org.springframework.web.context.support中GenericApplicationContext的子类 修饰符和类型 类 说明 class
GenericWebApplicationContext
Subclass ofGenericApplicationContext
, suitable for web environments.class
StaticWebApplicationContext
StaticWebApplicationContext
implementation for testing.