标签:pre mat expected rac table abs bst matching exp
Exception in thread "main" org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.wangyang.demo.Person] is defined: expected single matching bean but found 2: person,personTwo
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:312)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:985)
at com.wangyang.demo.TestBySpring.main(TestBySpring.java:16)
NoUniqueBeanDefinitionException:没有一个唯一的bean被找到;
Person person = context.getBean(Person.class);
使用Person.class,applicationContext中存在两个Peson类
NoUniqueBeanDefinitionException
标签:pre mat expected rac table abs bst matching exp
原文地址:https://www.cnblogs.com/wangyang9629/p/12392184.html