类 AutoProxyRegistrar
java.lang.Object
cn.taketoday.context.annotation.AutoProxyRegistrar
- 所有已实现的接口:
ImportBeanDefinitionRegistrar
Registers an auto proxy creator against the current
BeanDefinitionRegistry
as appropriate based on an @Enable* annotation having mode and
proxyTargetClass attributes set to the correct values.- 从以下版本开始:
- 4.0 2022/1/11 23:38
- 作者:
- Chris Beams, Harry Yang
- 另请参阅:
-
EnableCachingcn.taketoday.transaction.annotation.EnableTransactionManagement
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidregisterBeanDefinitions(cn.taketoday.core.type.AnnotationMetadata importingClassMetadata, BootstrapContext context) Register, escalate, and configure the standard auto proxy creator (APC) against the given registry.
-
构造器详细资料
-
AutoProxyRegistrar
public AutoProxyRegistrar()
-
-
方法详细资料
-
registerBeanDefinitions
public void registerBeanDefinitions(cn.taketoday.core.type.AnnotationMetadata importingClassMetadata, BootstrapContext context) Register, escalate, and configure the standard auto proxy creator (APC) against the given registry. Works by finding the nearest annotation declared on the importing@Configurationclass that has bothmodeandproxyTargetClassattributes. Ifmodeis set toPROXY, the APC is registered; ifproxyTargetClassis set totrue, then the APC is forced to use subclass (CGLIB) proxying.Several
@Enable*annotations expose bothmodeandproxyTargetClassattributes. 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 rightmodeandproxyTargetClassattributes, the APC can be registered and configured all the same.- 指定者:
registerBeanDefinitions在接口中ImportBeanDefinitionRegistrar- 参数:
importingClassMetadata- annotation metadata of the importing classcontext- Bean definition loading context
-