When you call the ListableBeanFactory.getBeansOfType() method, you cannot be sure which beans will be returned. Let's look at the code of the getBeansOfType() method in the DefaultListableBeanFactory.java class:
@Override@SuppressWarnings("unchecked")public <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException { ...... if (exBeanName != null && isCurrentlyInCreation(exBeanName)) { if (this.logger.isDebugEnabled()) { this.logger.debug("Ignoring match to currently created bean '" + exBeanName + "': " + ex.getMessage()); } onSuppressedException(ex); // Ignore: indicates a circular reference when auto wiring constructors. // We want to find matches ...