Root Cause
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [springmvc.xml]; nested exception is java.io.FileNotFoundException: class path resource [springmvc.xml] cannot be opened because it does not exist
這類報錯500問題通常是路徑或者配置問題:
有三種:
1、在springmvc.xml中寫 <mvc:annotation-driven />的時候,idea推薦的XML約束是cache的,我們把它全換成mvc的就可以了.
2、錯把applicationContext.xml放在了java包下,應該放在resource下
3、配置錯誤,在idea中ctrl+alt+shift+s,左側Modules選項中點擊