SpringAop原理时序图
2021-12-28 22:07:54 3 举报
SpringAop原理时序图
作者其他创作
大纲/内容
AbstractAutowireCapableBeanFactory
AdvisedSupport
MethodBeforeAdviceInterceptor
ReflectiveMethodInvocation
createAopProxy
根据拦截器链递归调用proceed方法不同的拦截器对象在不同的时机执行
findAdvisorsThatCanApply
创建代理类
invoke
applyBeanPostProcessorsAfterInitialization
BeanFactoryAdvisorRetrievalHelper
根据当前代理类执行的Method找到对应的Advice通知方法,并将Advice通知方法封装成MethodInterceptor
AfterReturningAdviceInterceptor
getInterceptorsAndDynamicInterceptionAdvice
createProxy
DefaultAopProxyFactory
getProxy
getAdvicesAndAdvisorsForBean
initializeBean()
回调通知
返回拦截器链
findAdvisorBeans
AbstractAutoProxyCreator
postProcessAfterInitialization
代码织入(invoke)
findCandidateAdvisors
ProxyCreatorSupport
ProxyFactory
DefaultAdvisorChainFactory
proceed
getAopProxyFactory
invoke()
findEligibleAdvisors
JdkDynamicAopProxy
sortAdvisors
wrapIfNecessary
返回具体的代理对象
AbstractAdvisorAutoProxyCreator
return
封装成ReflectiveMethodInvocation对象
0 条评论
下一页