-1
ApplicationContext context=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
InvGroupDelegate igcd = (InvGroupDelegate) context.getBean("invGroupDelegate");
給錯誤四處錯誤:在試圖讀取的applicationContext.xml在獨立的Java
Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
的appContext文件存在於myProject的/屬性 而這也被添加到「SRC文件夾中生成路徑'。
您是否讀過異常?檢查文件是否在所需位置。 – Naren