类 AutoProxyRegistrar
- java.lang.Object
- org.springframework.context.annotation.AutoProxyRegistrar
- 所有已实现的接口:
ImportBeanDefinitionRegistrar
public class AutoProxyRegistrar extends Object implements ImportBeanDefinitionRegistrar
Registers an auto proxy creator against the currentBeanDefinitionRegistry
as appropriate based on an@Enable*
annotation havingmode
andproxyTargetClass
attributes set to the correct values.- 从以下版本开始:
- 3.1
- 作者:
- Chris Beams
- 另请参阅:
EnableCaching
,EnableTransactionManagement
构造器概要
构造器 构造器 说明 AutoProxyRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
Register, escalate, and configure the standard auto proxy creator (APC) against the given registry.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.context.annotation.ImportBeanDefinitionRegistrar
registerBeanDefinitions
构造器详细资料
AutoProxyRegistrar
public AutoProxyRegistrar()
方法详细资料
registerBeanDefinitions
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
Register, escalate, and configure the standard auto proxy creator (APC) against the given registry. Works by finding the nearest annotation declared on the importing@Configuration
class that has bothmode
andproxyTargetClass
attributes. Ifmode
is set toPROXY
, the APC is registered; ifproxyTargetClass
is set totrue
, then the APC is forced to use subclass (CGLIB) proxying.Several
@Enable*
annotations expose bothmode
andproxyTargetClass
attributes. It is important to note that most of these capabilities end up sharing a single APC. For this reason, this implementation doesn't "care" exactly which annotation it finds -- as long as it exposes the rightmode
andproxyTargetClass
attributes, the APC can be registered and configured all the same.- 指定者:
registerBeanDefinitions
在接口中ImportBeanDefinitionRegistrar
- 参数:
importingClassMetadata
- annotation metadata of the importing classregistry
- current bean definition registry