Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException
今天在学习spring 框架的时候看着,很简单。但是在真正开始做的时候发现,异常一个接着一个,整的肚子都被搞大了。
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'people5' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:641) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1157) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:280) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973) at com.java.test.Test2.main(Test2.java:26)
刚开始,抛出的一场是实体类的异常。