List of usage examples for org.springframework.beans.factory.config ConfigurableBeanFactory isCurrentlyInCreation
boolean isCurrentlyInCreation(String beanName);
From source file:org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.java
/** * Resolves the specified interceptor names to Advisor objects. * @see #setInterceptorNames//from w ww . ja v a2s . com */ private Advisor[] resolveInterceptorNames() { 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)) { Assert.state(bf != null, "BeanFactory required for resolving interceptor names"); Object next = bf.getBean(beanName); advisors.add(this.advisorAdapterRegistry.wrap(next)); } } return advisors.toArray(new Advisor[advisors.size()]); }