open class NoUniqueBeanDefinitionException : NoSuchBeanDefinitionException
Exception thrown when a BeanFactory is asked for a bean instance for which multiple matching candidates have been found when only one matching bean was expected.
Author
Juergen Hoeller
Since
3.2.1
See Also
BeanFactory#getBean(Class)
NoUniqueBeanDefinitionException(type: Class<*>, numberOfBeansFound: Int, message: String)NoUniqueBeanDefinitionException(type: Class<*>, beanNamesFound: MutableCollection<String>)NoUniqueBeanDefinitionException(type: Class<*>, vararg beanNamesFound: String)
Create a new |
open fun getBeanNamesFound(): MutableCollection<String>
Return the names of all beans found when only one matching bean was expected. Note that this may be |
|
open fun getNumberOfBeansFound(): Int
Return the number of beans found when only one matching bean was expected. For a NoUniqueBeanDefinitionException, this will usually be higher than 1. |