接口的使用
org.springframework.beans.factory.support.BeanDefinitionRegistry
使用BeanDefinitionRegistry的程序包 程序包 说明 org.springframework.aop.config Support package for declarative AOP configuration, with XML schema being the primary configuration format.org.springframework.aop.scope Support for AOP-based scoping of target objects, with configurable backend.org.springframework.beans.factory.groovy Support package for Groovy-based bean definitions.org.springframework.beans.factory.support Classes supporting theorg.springframework.beans.factory
package.org.springframework.beans.factory.xml Contains an abstract XML-basedBeanFactory
implementation, including a standard "spring-beans" XSD.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.jdbc.core.support Classes supporting theorg.springframework.jdbc.core
package.org.springframework.scripting.config Support package for Spring's dynamic language machinery, with XML schema being the primary configuration format.org.springframework.web.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.org.springframework.aop.config中BeanDefinitionRegistry的使用
参数类型为BeanDefinitionRegistry的org.springframework.aop.config中的方法 修饰符和类型 方法 说明 static void
AopConfigUtils. forceAutoProxyCreatorToExposeProxy(BeanDefinitionRegistry registry)
static void
AopConfigUtils. forceAutoProxyCreatorToUseClassProxying(BeanDefinitionRegistry registry)
static BeanDefinition
AopConfigUtils. registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
static BeanDefinition
AopConfigUtils. registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, Object source)
static BeanDefinition
AopConfigUtils. registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
static BeanDefinition
AopConfigUtils. registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, Object source)
static BeanDefinition
AopConfigUtils. registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
static BeanDefinition
AopConfigUtils. registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, Object source)
org.springframework.aop.scope中BeanDefinitionRegistry的使用
参数类型为BeanDefinitionRegistry的org.springframework.aop.scope中的方法 修饰符和类型 方法 说明 static BeanDefinitionHolder
ScopedProxyUtils. createScopedProxy(BeanDefinitionHolder definition, BeanDefinitionRegistry registry, boolean proxyTargetClass)
Generate a scoped proxy for the supplied target bean, registering the target bean with an internal name and setting 'targetBeanName' on the scoped proxy.org.springframework.beans.factory.groovy中BeanDefinitionRegistry的使用
参数类型为BeanDefinitionRegistry的org.springframework.beans.factory.groovy中的构造器 构造器 说明 GroovyBeanDefinitionReader(BeanDefinitionRegistry registry)
Create a newGroovyBeanDefinitionReader
for the givenBeanDefinitionRegistry
.org.springframework.beans.factory.support中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.beans.factory.support中的类 修饰符和类型 类 说明 class
DefaultListableBeanFactory
Spring's default implementation of theConfigurableListableBeanFactory
andBeanDefinitionRegistry
interfaces: a full-fledged bean factory based on bean definition metadata, extensible through post-processors.class
SimpleBeanDefinitionRegistry
Simple implementation of theBeanDefinitionRegistry
interface.返回BeanDefinitionRegistry的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 BeanDefinitionRegistry
AbstractBeanDefinitionReader. getBeanFactory()
BeanDefinitionRegistry
AbstractBeanDefinitionReader. getRegistry()
BeanDefinitionRegistry
BeanDefinitionReader. getRegistry()
Return the bean factory to register the bean definitions with.参数类型为BeanDefinitionRegistry的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 static String
BeanDefinitionReaderUtils. generateBeanName(BeanDefinition beanDefinition, BeanDefinitionRegistry registry)
Generate a bean name for the given top-level bean definition, unique within the given bean factory.static String
BeanDefinitionReaderUtils. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry, boolean isInnerBean)
Generate a bean name for the given bean definition, unique within the given bean factory.String
BeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
Generate a bean name for the given bean definition.String
DefaultBeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
void
BeanDefinitionRegistryPostProcessor. postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry)
Modify the application context's internal bean definition registry after its standard initialization.static void
BeanDefinitionReaderUtils. registerBeanDefinition(BeanDefinitionHolder definitionHolder, BeanDefinitionRegistry registry)
Register the given bean definition with the given bean factory.static String
BeanDefinitionReaderUtils. registerWithGeneratedName(AbstractBeanDefinition definition, BeanDefinitionRegistry registry)
Register the given bean definition with a generated name, unique within the given bean factory.static String
BeanDefinitionReaderUtils. uniqueBeanName(String beanName, BeanDefinitionRegistry registry)
Turn the given bean name into a unique bean name for the given bean factory, appending a unique counter as suffix if necessary.参数类型为BeanDefinitionRegistry的org.springframework.beans.factory.support中的构造器 构造器 说明 AbstractBeanDefinitionReader(BeanDefinitionRegistry registry)
Create a new AbstractBeanDefinitionReader for the given bean factory.PropertiesBeanDefinitionReader(BeanDefinitionRegistry registry)
Create new PropertiesBeanDefinitionReader for the given bean factory.org.springframework.beans.factory.xml中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.beans.factory.xml中的类 修饰符和类型 类 说明 class
XmlBeanFactory
已过时。as of Spring 3.1 in favor ofDefaultListableBeanFactory
andXmlBeanDefinitionReader
返回BeanDefinitionRegistry的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 BeanDefinitionRegistry
ParserContext. getRegistry()
BeanDefinitionRegistry
XmlReaderContext. getRegistry()
Return the bean definition registry to use.参数类型为BeanDefinitionRegistry的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 protected void
AbstractBeanDefinitionParser. registerBeanDefinition(BeanDefinitionHolder definition, BeanDefinitionRegistry registry)
参数类型为BeanDefinitionRegistry的org.springframework.beans.factory.xml中的构造器 构造器 说明 XmlBeanDefinitionReader(BeanDefinitionRegistry registry)
Create new XmlBeanDefinitionReader for the given bean factory.org.springframework.context.annotation中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.context.annotation中的类 修饰符和类型 类 说明 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.返回BeanDefinitionRegistry的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 BeanDefinitionRegistry
AnnotatedBeanDefinitionReader. getRegistry()
Get the BeanDefinitionRegistry that this reader operates on.BeanDefinitionRegistry
ClassPathBeanDefinitionScanner. getRegistry()
Return the BeanDefinitionRegistry that this scanner operates on.protected BeanDefinitionRegistry
ClassPathScanningCandidateComponentProvider. getRegistry()
Return theBeanDefinitionRegistry
used by this scanner, if any.BeanDefinitionRegistry
ConditionContext. getRegistry()
Return theBeanDefinitionRegistry
that will hold the bean definition should the condition match.参数类型为BeanDefinitionRegistry的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 protected String
AnnotationBeanNameGenerator. buildDefaultBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
Derive a default bean name from the given bean definition.String
AnnotationBeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
void
ConfigurationClassPostProcessor. postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry)
Derive further bean definitions from the configuration classes in the registry.void
ConfigurationClassPostProcessor. processConfigBeanDefinitions(BeanDefinitionRegistry registry)
Build and validate a configuration model based on the registry ofConfiguration
classes.static void
AnnotationConfigUtils. registerAnnotationConfigProcessors(BeanDefinitionRegistry registry)
Register all relevant annotation post processors in the given registry.static Set<BeanDefinitionHolder>
AnnotationConfigUtils. registerAnnotationConfigProcessors(BeanDefinitionRegistry registry, Object source)
Register all relevant annotation post processors in the given registry.protected void
ClassPathBeanDefinitionScanner. registerBeanDefinition(BeanDefinitionHolder definitionHolder, BeanDefinitionRegistry registry)
Register the specified bean with the given registry.void
AutoProxyRegistrar. registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
Register, escalate, and configure the standard auto proxy creator (APC) against the given registry.default void
ImportBeanDefinitionRegistrar. registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
Register bean definitions as necessary based on the given annotation metadata of the importing@Configuration
class.default void
ImportBeanDefinitionRegistrar. registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry, BeanNameGenerator importBeanNameGenerator)
Register bean definitions as necessary based on the given annotation metadata of the importing@Configuration
class.参数类型为BeanDefinitionRegistry的org.springframework.context.annotation中的构造器 构造器 说明 AnnotatedBeanDefinitionReader(BeanDefinitionRegistry registry)
Create a newAnnotatedBeanDefinitionReader
for the given registry.AnnotatedBeanDefinitionReader(BeanDefinitionRegistry registry, Environment environment)
Create a newAnnotatedBeanDefinitionReader
for the given registry, using the givenEnvironment
.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry)
Create a newClassPathBeanDefinitionScanner
for the given bean factory.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters)
Create a newClassPathBeanDefinitionScanner
for the given bean factory.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters, Environment environment)
Create a newClassPathBeanDefinitionScanner
for the given bean factory and using the givenEnvironment
when evaluating bean definition profile metadata.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters, Environment environment, ResourceLoader resourceLoader)
Create a newClassPathBeanDefinitionScanner
for the given bean factory and using the givenEnvironment
when evaluating bean definition profile metadata.org.springframework.context.support中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.context.support中的类 修饰符和类型 类 说明 class
GenericApplicationContext
Generic ApplicationContext implementation that holds a single internalDefaultListableBeanFactory
instance and does not assume a specific bean definition format.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中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.jca.context中的类 修饰符和类型 类 说明 class
ResourceAdapterApplicationContext
ApplicationContext
implementation for a JCA ResourceAdapter.参数类型为BeanDefinitionRegistry的org.springframework.jca.context中的方法 修饰符和类型 方法 说明 protected void
SpringContextResourceAdapter. loadBeanDefinitions(BeanDefinitionRegistry registry, String[] configLocations)
Load the bean definitions into the given registry, based on the specified configuration files.org.springframework.jdbc.core.support中BeanDefinitionRegistry的使用
参数类型为BeanDefinitionRegistry的org.springframework.jdbc.core.support中的构造器 构造器 说明 JdbcBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
Create a new JdbcBeanDefinitionReader for the given bean factory, using a default PropertiesBeanDefinitionReader underneath.org.springframework.scripting.config中BeanDefinitionRegistry的使用
参数类型为BeanDefinitionRegistry的org.springframework.scripting.config中的方法 修饰符和类型 方法 说明 static BeanDefinition
LangNamespaceUtils. registerScriptFactoryPostProcessorIfNecessary(BeanDefinitionRegistry registry)
Register aScriptFactoryPostProcessor
bean definition in the suppliedBeanDefinitionRegistry
if theScriptFactoryPostProcessor
hasn't already been registered.org.springframework.web.context.support中BeanDefinitionRegistry的使用
实现BeanDefinitionRegistry的org.springframework.web.context.support中的类 修饰符和类型 类 说明 class
GenericWebApplicationContext
Subclass ofGenericApplicationContext
, suitable for web environments.class
StaticWebApplicationContext
StaticWebApplicationContext
implementation for testing.