运行spring注入方式的时候出现错误
@Test
public void testAdd(){
ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
User user = context.getBean("user", User.class);
System.out.println(user);
user.add();
}
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [bean.xml]; nested exception is java.io.FileNotFoundException: class path resource [bean.xml] cannot be opened because it does not exist解决方案
- 将bean1从根目录上的包 移入到resources即可


![class path resource [bean.xml] cannot be opened because it does not 错误解决方案 class path resource [bean.xml] cannot be opened because it does not 错误解决方案](http://www.mshxw.com/aiimages/31/1039508.png)
