Hi,
DefaultListableBeanFactory#getBeansOfType catches and swallows BeanCreationException. The method documentation and name creates the assumption, that getBeansOfType has the same behiour like
for (String beanName : listableBeanFactory.getBeanNamesForType(type)) {
Object bean = listableBeanFactory.getBean(beanName);
}
But the result is totally differnt. This behaviour is not well documented and unexpected to the client.
Best greetings,
Ben
Hi,
DefaultListableBeanFactory#getBeansOfTypecatches and swallowsBeanCreationException. The method documentation and name creates the assumption, that getBeansOfType has the same behiour likeBut the result is totally differnt. This behaviour is not well documented and unexpected to the client.
Best greetings,
Ben