if (!(configurableListableBeanFactory instanceof DefaultListableBeanFactory)) {
throw new IllegalStateException(
"EnvironmentAnnotationConfigurer needs to operate on a DefaultListableBeanFactory");
}
DefaultListableBeanFactory defaultListableBeanFactory = (DefaultListableBeanFactory) configurableListableBeanFactory;
defaultListableBeanFactory.setAutowireCandidateResolver(new ConstrettoAutowireCandidateResolver());
String[] beanNames = configurableListableBeanFactory.getBeanDefinitionNames();
int lowestDiscoveredPriority = Integer.MAX_VALUE;
for (String beanName : beanNames) {
BeanDefinition beanDefinition = configurableListableBeanFactory.getBeanDefinition(beanName);
if (beanDefinition.getBeanClassName() != null) {