报错: IOException parsing XML document from class path resource [spring-injection.xml]; nested exception is java.io.FileNotFoundException:
class path resource [spring-injection.xml] cannot be opened because it does not exist
应该怎样存放?
一般放在与包同级目录下,在类里使用ClassPathXmlApplicationContext cpx=new ClassPathXmlApplicationContext("spring-injection.xml")找到;getBean("beanId")获取配置好的注入对象