現象
報此異常 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
原因
Spring官方文檔中規定,如果在上下文中沒有指定contextConfigLoction配置文件的位置,則會默認去WEB-INF中去尋找對應的配置文件。
解決方法
項目中沒有用到 applicationContext.xml文件,所以在web.xml中添加一個空的contextConfigLocation就可以了
現象
報此異常 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
原因
Spring官方文檔中規定,如果在上下文中沒有指定contextConfigLoction配置文件的位置,則會默認去WEB-INF中去尋找對應的配置文件。
解決方法
項目中沒有用到 applicationContext.xml文件,所以在web.xml中添加一個空的contextConfigLocation就可以了
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。