IDEA+SSM項目構建
問題描述
- 1、部署的時候報錯找不到classpath下面的spring/applicationContext.xml文件。
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/applicationContext.xml] cannot be opened because it does not exist
- 2、查看項目目錄發現spring/applicationContext.xml文件確實是在classpath下。
- 3、最後發現是因爲resources文件夾沒有設置爲資源文件夾的問題,所以項目創建的時候一定要注意細節!!!!!
解決辦法
點擊File→Project Structure將resources設置爲資源文件夾重新部署即可。