适用场景

上代码

  1. public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyCreator {
  2. protected List<Advisor> findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> beanClass, String beanName) {
  3. ProxyCreationContext.setCurrentProxiedBeanName(beanName);
  4. try {
  5. return AopUtils.findAdvisorsThatCanApply(candidateAdvisors, beanClass);
  6. }
  7. finally {
  8. ProxyCreationContext.setCurrentProxiedBeanName(null);
  9. }
  10. }
  11. }