|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2017 the original author or authors. |
|
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -544,13 +544,13 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport |
|
|
|
|
* @see #setInterceptorNames |
|
|
|
|
*/ |
|
|
|
|
private Advisor[] resolveInterceptorNames() { |
|
|
|
|
Assert.state(this.beanFactory != null, "BeanFactory required for resolving interceptor names"); |
|
|
|
|
ConfigurableBeanFactory cbf = (this.beanFactory instanceof ConfigurableBeanFactory ? |
|
|
|
|
(ConfigurableBeanFactory) this.beanFactory : null); |
|
|
|
|
BeanFactory bf = this.beanFactory; |
|
|
|
|
ConfigurableBeanFactory cbf = (bf instanceof ConfigurableBeanFactory ? (ConfigurableBeanFactory) bf : null); |
|
|
|
|
List<Advisor> advisors = new ArrayList<>(); |
|
|
|
|
for (String beanName : this.interceptorNames) { |
|
|
|
|
if (cbf == null || !cbf.isCurrentlyInCreation(beanName)) { |
|
|
|
|
Object next = this.beanFactory.getBean(beanName); |
|
|
|
|
Assert.state(bf != null, "BeanFactory required for resolving interceptor names"); |
|
|
|
|
Object next = bf.getBean(beanName); |
|
|
|
|
advisors.add(this.advisorAdapterRegistry.wrap(next)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|