@Override @Nullable public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName()); postProcessTargetObject(this.target); } return this.target; }
private static void validateBeanCycle(Object auth, Set<String> beanNames) { if (auth != null && !beanNames.isEmpty()) { if (auth instanceof Advised) { Advised advised = (Advised) auth; TargetSource targetSource = advised.getTargetSource(); if (targetSource instanceof LazyInitTargetSource) { LazyInitTargetSource lits = (LazyInitTargetSource) targetSource; if (beanNames.contains(lits.getTargetBeanName())) { throw new FatalBeanException( "A dependency cycle was detected when trying to resolve the AuthenticationManager. Please ensure you have configured authentication."); } } } beanNames = Collections.emptySet(); } } }
private static void validateBeanCycle(Object auth, Set<String> beanNames) { if (auth != null && !beanNames.isEmpty()) { if (auth instanceof Advised) { Advised advised = (Advised) auth; TargetSource targetSource = advised.getTargetSource(); if (targetSource instanceof LazyInitTargetSource) { LazyInitTargetSource lits = (LazyInitTargetSource) targetSource; if (beanNames.contains(lits.getTargetBeanName())) { throw new FatalBeanException( "A dependency cycle was detected when trying to resolve the AuthenticationManager. Please ensure you have configured authentication."); } } } beanNames = Collections.emptySet(); } } }
@Override @Nullable public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName()); postProcessTargetObject(this.target); } return this.target; }
@Override public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName()); postProcessTargetObject(this.target); } return this.target; }
public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName()); postProcessTargetObject(this.target); } return this.target; }
private static void validateBeanCycle(Object auth, Set<String> beanNames) { if (auth != null && !beanNames.isEmpty()) { if (auth instanceof Advised) { Advised advised = (Advised) auth; TargetSource targetSource = advised.getTargetSource(); if (targetSource instanceof LazyInitTargetSource) { LazyInitTargetSource lits = (LazyInitTargetSource) targetSource; if (beanNames.contains(lits.getTargetBeanName())) { throw new FatalBeanException( "A dependency cycle was detected when trying to resolve the AuthenticationManager. Please ensure you have configured authentication."); } } } beanNames = Collections.emptySet(); } } }